This article will introduce to PHP beginners the solution to the prompt Call to undefined function mysql_connect() when connecting to mysql after PHP is configured.
First, let’s test the php connection to mysql according to the book
The code is as follows
|
Copy code
|
||||
$link=mysql_connect('localhost','root','123456'); if(!$link) echo "Failed!"; else echo "Success!";mysql_close(); ?>
Running the code appears: Call to undefined function 'mysql_connect()'…
|
Copy the php_mysql.dll and libmysql.dll files to c:/winnt/system32 (I missed libmysql.dll)
http://www.bkjia.com/PHPjc/632612.htmlwww.bkjia.comtruehttp: //www.bkjia.com/PHPjc/632612.htmlTechArticleThis article will introduce to php beginners how to connect to mysql after php is configured. Call to undefined function 'mysql_connect() solution. First, let’s test the php connection to mysql according to the book. The code is like...