Today the site is opened suddenly found error: "PHP Deprecated: mysql_connect (): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in".
Upon inquiry it was mysql_connect () The mysql extension is obsolete, it may be removed in the future. Recommended mysqli or pdo.
But why is it good before?
This is because different php versions, the new version will have this prompt.
There are three solutions.
method one
Changed
Ban php error, but this is clearly unwise, because if what went wrong, we do not know.
Method Two
In php program, add the following code.
But it not recommended, it is best to use three or mysql because it is too unsafe, too old.
Method Three
The change mysql mysqli, you may feel the need to change a lot, in fact, not much, just a general change mysql.class.php file on it.
For example, the
Changed
It can be.
Many places are the same, just the "mysql" changed to "mysqli" can be solved.