Home > Backend Development > PHP Tutorial > mysql调试报错 急求大侠帮忙,该如何解决

mysql调试报错 急求大侠帮忙,该如何解决

WBOY
Release: 2016-06-13 12:44:36
Original
890 people have browsed it

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"链接数据库失败";
}
?>
请大侠赐教!!!感激涕零!!!

mysql apache php
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