时间:2021-07-01 10:21:17 帮助过:16人阅读
//连接数据库$con = mysql_connect("{$host}:{$port}",$user,$pwd,true) or die("Connect Server Failed: " . mysql_error());//进入某个数据库mysql_select_db($dbname,$con)) or die("Select Database Failed: " . mysql_error($con));
//连接数据库$con = mysql_connect("{$host}:{$port}",$user,$pwd,true);if(!$con){ die("Connect Server Failed: " . mysql_error());}//进入某个数据库if(!mysql_select_db($dbname,$con)) { die("Select Database Failed: " . mysql_error($con));}