Rumah > Artikel > pembangunan bahagian belakang > mysql调试报错 急求大侠帮忙,该如何解决
mysql调试报错 急求大侠帮忙
mysql安装测试报错
Fatal error: Call to undefined function mysql_connect() in C:\myenv\apache\htdocs\test.php on line 3
1:我检查了mysql已经启动
extension=php_mysql.dll
extension=php_mysqli.dll前面分号已经去掉
2:路径已经更改
extension_dir = "C:/myenv/php/ext"
3:php5ts.dll
libmysql.dll文件已经粘贴到WINDOWS下的system下
4:apache的php模块已经加载
LoadModule php5_module C:/myenv/php/php5apache2_2.dll
PHPIniDir "C:/myenv/php"
AddType application/x-httpd-php .php .phtml
5测试代码
$conn=mysql_connect("localhost","root","1985032468root");
if($conn){
echo"链接到数据库成功";
}else{
echo"链接数据库失败";
}
?>
请大侠赐教!!!感激涕零!!!