用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() |
|