Home  >  Article  >  Backend Development  >  php和mysql5.5的整合解决思路

php和mysql5.5的整合解决思路

WBOY
WBOYOriginal
2016-06-13 13:37:58841browse

php和mysql5.5的整合
php.ini:
extension_dir = "C:/phpenv/php-5.2/ext"
extension=php_mysql.dll
extension=php_mysqli.dll
extension=php_bz2.dll
extension=php_gd2.dll

php文件:
$link = mysql_connect('localhost', 'root', 'root');
if (!$link) {
die('Could not connect: ' . mysql_error());
}
echo 'Connected successfully';
mysql_close($link);
?>


apache error.log:
PHP Fatal error: Call to undefined function mysql_connect() in C:\\phpenv\\Apache2.2\\htdocs\\testmysql.php on line 2

请问是怎么回事啊?

------解决方案--------------------
phpinfo();
检查php.ini 路径是否是修改过的文件.

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn