Home  >  Article  >  Backend Development  >  PHP connection to mysql testing and configuration_PHP tutorial

PHP connection to mysql testing and configuration_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 17:33:23785browse

php(as the current mainstream development language)Connect to MySQL(the best combination with PHP)Test code:

(As the current mainstream development language)
$link=MySQL(The best combination with PHP)_connect(localhost,root,123456);
if( !$link) echo "Failure!";
else echo "Success!";
MySQL(The best combination with PHP)_close();
?>

Running code appears: Call to undefined function MySQL(The best combination with PHP)_connect()... Failed

Baidu found the result is php(do The current mainstream development language)+MySQL(the best combination with PHP) The environment is not configured properly, php(the current mainstream development language)5 By default MySQL(the best combination with PHP) is closed

and php(as the current mainstream development language)_MySQL(with PHP The best combination).dll and libMySQL(The best combination with PHP).dll file is copied to c:winntsystem32 (I missed libMySQL(The best combination with PHP) The best combination).dll)

Find php(as the current mainstream development language);extension=php(as the current mainstream development language) in .ini Development language)_MySQL(The best combination with PHP), remove the ";" in front of it Restart the server

Haha, the problem is solved

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/508624.htmlTechArticlephp (as the current mainstream development language) connects to MySQL (the best combination with PHP) Test code: ?php (as the current mainstream development language) link=MySQL (the best combination with PHP)...
Statement:
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