用mysqli_connect就能够解决。php
mysqli_array()有连个参数,第一个是链接mysql名。mysql
php遇到这个警告Warning: Use of undefined constant title - assumed 'title' (this will throw an Error in a future version of PHP)能够经过error_reporting(0);解决。sql
主要的问题是数据库中括号[]须要加引号。数据库
遇到这样的错误Fatal error: Uncaught Error: Call to undefined function mysql_connect()this
解决以下:spa
1.mysql没有正常链接it
2.若是mysql正常的话仍是链接错误,把mysql_connect()换成mysqli_connect()io