解决PHP中Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the futu
来源:互联网 发布:随机数预测算法 编辑:程序博客网 时间:2024/06/05 07:34
Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future: use mysqli or PDO instead in说明
说mysql_connect这个模块将在未来弃用,请你使用mysqli或者PDO来替代。
方法一:
在php.ini中更改错误级别 error_reporting = E.ALL & ~E_NOTICE &~ E_DEPRECATED
方法二:
不让其提示错误(不建议)
在php.ini中将 display_errors = On 改为display_errors = Off
方法三:
在php代码中
<?php
error_reporting
(E_ALL ^ E_DEPRECATED);
方法四:
将mysql改用mysqli
<?php
$link
= mysql_connect(
'localhost'
,
'user'
,
'password'
);
mysql_select_db(
'dbname'
,
$link
);
改成mysqi
$link
= mysqli_connect(
'localhost'
,
'user'
,
'password'
,
'dbname'
);
将
mysql_query(
'CREATE TEMPORARY TABLE `table`'
,
$link
);
改为
mysqli_query(
$link
,
'CREATE TEMPORARY TABLE `table`'
);
0 0
- 解决PHP中Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the futu
- 解决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:
- 解决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:
- 解决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:
- 解决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:
- 解决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:
- 解决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:
- 解决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:
- 解决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:
- 解决Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the future:
- 导航栏设置透明
- Spring工作原理探秘
- Nginx系列(十四. nginx分离静态文件)
- Algs4-1.4.18 Find local minimum in n x n matrix in O(n) time
- 一个protobuf-net的小坑
- 解决PHP中Deprecated: mysql_connect(): The mysql extension is deprecated and will be removed in the futu
- mysql之触发器trigger
- 结构体赋值
- 从汇编的角度理解为什么c样式函数使用时,实参尽量使用指针传递
- sysfs接口函数到建立_DEVICE_ATTR
- linux下升级tomcat中的应用服务器
- [LeetCode]-012-Integer to Roman
- soot
- Windows中