Undefined function mysql_connect()(未定义函数 mysql_connect())
问题描述
I have ran aptitude install php5-mysql
(and restarted MySQL/Apache 2), but I am still getting this error:
Fatal error: Call to undefined function mysql_connect() in /home/validate.php on line 21
phpinfo()
says the /etc/php5/apache2/conf.d/pdo_mysql.ini file has been parsed.
Well, this is your chance! It looks like PDO is ready; use that instead.
Try checking to see if the PHP MySQL extension module is being loaded:
<?php
phpinfo();
?>
If it's not there, add the following to the php.ini
file:
extension=php_mysql.dll
这篇关于未定义函数 mysql_connect()的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!