PHP连数据库mysql代码错误
//----设定------$mysql_server_name="localhost";$mysql_username="root";$mysql_password="...
//----设定------
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "freedom";
$mysql_datebase = "bbs_sql";
//---测试连接----
$link=mysql_connect("127.0.0.1","root","freedom");
if(!$link) echo "success!";//连接成功
else echo "fail!"; //连接有问题
//mysql_close(); 展开
$mysql_server_name = "localhost";
$mysql_username = "root";
$mysql_password = "freedom";
$mysql_datebase = "bbs_sql";
//---测试连接----
$link=mysql_connect("127.0.0.1","root","freedom");
if(!$link) echo "success!";//连接成功
else echo "fail!"; //连接有问题
//mysql_close(); 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询