Last active
July 26, 2019 07:18
-
-
Save chenshaoju/fb30a049f86b47d36f688280899e5b8b to your computer and use it in GitHub Desktop.
In php,Check MySQL working or not.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$link=mysql_connect("SERVER_ADDRESS","MYSQL_USERNAME","MYSQL_PASSWORD"); | |
if($link) echo "OK"; | |
else header('HTTP/1.1 500 Internal Server Error'); | |
?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$link=mysqli_connect("SERVER_ADDRESS","MYSQL_USERNAME","MYSQL_PASSWORD"); | |
if($link) echo "OK"; | |
else header('HTTP/1.1 500 Internal Server Error'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment