致命错误:未捕获的错误:调用未定义的函数mysql_pconnect()
问题描述:
Fatal error: Uncaught Error: Call to undefined function mysql_pconnect() in D:\xampp\htdocs\IKM\system\database\drivers\mysql\mysql_driver.php:91致命错误:未捕获的错误:调用未定义的函数mysql_pconnect()
function db_pconnect()
{
if ($this->port != '')
{
$this->hostname .= ':'.$this->port;
}
return @mysql_pconnect($this->hostname, $this->username, $this->password);
}
答
此功能已被删除,因为PHP 7.0和PHP中5.5弃用。很可能你正在使用PHP 7.0。
要解决此问题,您需要使用mysqli扩展名或PDO扩展名。
+0
非常感谢, 我已经将msql改成mysqli,它的工作原理 –
您使用的是什么版本的'php'? – Swellar