连接mysql用mysql_connect不能连接

2022-10-12,,

mysqli_connect就可以解决。

mysqli_array()有连个参数,第一个是连接mysql名。

php遇到这个警告warning: use of undefined constant title - assumed 'title' (this will throw an error in a future version of php)可以通过error_reporting(0);解决。

主要的问题是数据库中括号[]需要加引号。

遇到这样的错误fatal error: uncaught error: call to undefined function mysql_connect()

解决如下

1.mysql没有正常连接

2.如果mysql正常的话还是连接错误,把mysql_connect()换成mysqli_connect()

《连接mysql用mysql_connect不能连接.doc》

下载本文的Word格式文档,以方便收藏与打印。