解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
程序员文章站
2024-01-08 14:40:28
...
php 5个版本,5.2、5.3、5.4、5.5,怕跟不上时代,新的服务器直接上5.5,但是程序出现如下错误:Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in the future,看意思就很明了,说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代。mysqli
更严谨 安全 高效
解决方法1:
禁止php报错
display_errors = On
改为
display_errors = Off
鉴于这个服务器都是给用户用的,有时候他们需要报错(…都是给朋友用的,^_^),不能这做,让他们改程序吧,看方案2.
解决方法2:
error_reporting(E_ALL ^ E_DEPRECATED);
以上就介绍了解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:,包括了方面的内容,希望对PHP教程有兴趣的朋友有所帮助。
推荐阅读
-
解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
-
解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in
-
PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法
-
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO
-
PHP提示Deprecated: mysql_connect(): The mysql extension is deprecated的解决方法
-
The mysql extension is deprecated and will be removed in the future,这是什么原因啊?
-
The mysql extension is deprecated and will be removed in the future,这是什么原因啊解决方法
-
MySQL - 1681 Integer display width is deprecated and will be removed in a future release
-
PHP提示Deprecated: mysql_connect(): The mysql extension is dep_PHP
-
PHP提示Deprecated: mysql_connect(): The mysql extension is dep_PHP