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

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

WBOY
Release: 2016-06-13 13:37:58
Original
908 people have browsed it

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 路径是否是修改过的文件.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template