If you configure phpmysqlapache for the first time, how can we test that php is successfully connected to the database? just create a test. php file and save the following code to the file :? Php... if you are configuring php mysql apache for the first time, how can we test that php is successfully connected to the database? just create a test. php file, and then save the following code to the file. the code is as follows:
Open http: // localhost/test. php in the browser
If the input is successful, your configuration is successful. if the input fails, you can go to mysql_connect ("localhost", "root", "12345") or die (mysql_error ()); in this way, an error message is displayed.
If the mysql_connect function is not defined, we can use the following in php. ini:
; Extension = php_mysql.dll
; Extension = php_mysqli.dll
Move the previous one.
Extension = php_mysql.dll
Extension = php_mysqli.dll
Restart apache.
Tutorial URL:
You are welcome to add your _ favorites to the Favorites folder, but please keep the link for this article.