我刚刚更改了我的主机,之前工作正常,但现在报告:
致命错误:调用未定义的函数mysql_connect()
function connect($dbhost, $dbuser, $dbpw, $dbname = '', $charset = 'utf8', $pconnect = 0, $quiet = 0)
{
if ($pconnect)
{
if (!($this->link_id = @mysql_pconnect($dbhost, $dbuser, $dbpw)))
{
if (!$quiet)
{
$this->ErrorMsg("Can't pConnect MySQL Server($dbhost)!");
}
return false;
}
}
else
{
if (PHP_VERSION >= '4.2')
{
$this->link_id = @mysql_connect($dbhost, $dbuser, $dbpw, true);
}
else
{
$this->link_id = @mysql_connect($dbhost, $dbuser, $dbpw);
mt_srand((double)microtime() * 1000000);
}
if (!$this->link_id)
{
if (!$quiet)
{
$this->ErrorMsg("Can't Connect MySQL Server($dbhost)!");
}
return false;
}
}
我该如何解决这个问题?