[PROBLEM] Deprecated: mysql_connect()
Deprecated: mysql_connect(): The mysqlextension is deprecated and will be removed in the future: use mysqli or PDOinstead in D:\ApaServ\php\includes\myfun2.php on line 17
Deprecated:mysql_connect(): The mysql extension is deprecated and will be removed in thefuture: use mysqli or PDO instead in D:\ApaServ\php\includes\duibifun.php online 6
这是在新版本的php中不再支持mysql_connect()这个函数,改用$link = mysqli_connect("myhost","myuser","mypassw","mybd") or die("Error " . mysqli_error($link));
但是这个方法不靠谱,改了之后又出现一大堆别的问题。
正确做法:代码前面加上
error_reporting(0);
这样就好了!!!!!!!!!!!!!!!!!!!
纪念php零基础的我1个半小时解决了团队一整天都没解决的问题,要不是今天就要调好交货,我怎么可能8点不到就起床了?