像魅力一样:
mysql_connect('localhost') or die('Could not connect to MySQL database');
mysql_select_db('k') or die('Couldnt select MySQL database in connect.php');
这两个都因内部服务器错误(500)而失败
$mysqli = new mysql('localhost',null,null,'k');
$mysqli = new mysql('localhost','','','k');
答案 0 :(得分:2)
您错过了i
mysqli
$mysqli = new mysql('localhost',null,null,'k');
$mysqli = new mysql('localhost','','','k');
应该是
$mysqli = new mysqli('localhost',null,null,'k');
$mysqli = new mysqli('localhost','','','k');
答案 1 :(得分:0)
它应该是new mysqli(..
而不是new mysql(..
:
$mysqli = new mysqli('localhost',null,null,'k');
$mysqli = new mysqli('localhost','','','k');
的手册