<?php
header("content-type:text/html;charset=utf-8");
$mq=mysqli_connect('localhost','root','');
if(!$mq){
echo "链接失败";
}
else{
echo "链接成功";
}
if(mysql_query("CREATE DATABASE animal",$mq)){
echo "创建成功";
}else{
echo "创建失败";
}
?>
错因: Warning: mysql_query() expects parameter 2 to be resource, object given in D:\WAMPServer\wamp\www\phptext\phptext1\mysqltext.php on line10
KevenHuang