I connect to the Mysql database from localhost, everything is fine ... And it doesn't work on the server ... And there are no errors, and the script (php) does not work anymore. Hosting the database from one host, and hosting the site is very, very different ...
Question: This (different hosting) can cause the inoperability of the script? Already a day killed ...
I solved the question - as I understood, there was no mysqli driver on the server, there were no such problems with PDO!
error_reporting(E_ALL)
at the very beginning of the script and errors will come out into the light. And remove the@
before the variables. To connect to MySQL, you need to specify exactly the parameters that the hoster and indicates to connect. I hope you have in the script, which is "on the server",localhost
not entered, as the host for the connection (since the base is in a different place)? - void