我是PHP编程的新手,在链接连接时遇到了此问题。我在第20行出现此错误
这是第20行中的代码:$ this-> conn = mysql_connect(server,user,pass);
public function open_connection() {
$this->conn = mysql_connect(server,user,pass);
if(!$this->conn){
echo "Problem in database connection! Contact administrator!";
exit();
}else{
$db_select = mysql_select_db(database_name,$this->conn);
if (!$db_select) {
echo "Problem in selecting database! Contact administrator!";
exit();
}
}
}