Php connects to mysql for test and configuration. Read the php connection to mysql test and configuration. The php connection to mysql test code is as follows :? Php $ link = mysql_connect ("> <LINKhref =" http://www.php100.com//statics/style/headfloor_950_081205.css "type = tex
Php connection mysql test code:
$ Link = mysql_connect ('localhost', 'root', '123 ');
If (! $ Link) echo "failed! ";
Else echo "successful! ";
Mysql_close ();
?>
The following code appears: Call to undefined function 'MySQL _ connect ()'... Failed
Baidu found that the PHP + MYSQL environment is not configured, and php5's default mysql is disabled.
Copy the php_mysql.dll and libmysql. dll files to c: \ winnt \ system32 (I missed libmysql. dll)
Find; extension = php_mysql in php. ini and remove ";" restart the server.
Haha, problem solving
Http://blog.csdn.net/yeyu712/archive/2007/02/20/1512142.aspx