Created
October 5, 2012 14:08
-
-
Save cemerson/3839977 to your computer and use it in GitHub Desktop.
PHP: Test Database Connection
This file contains 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 | |
// Test a database connection via PHP | |
$db = @mysql_connect('#SERVER_NAME#', '#DB_USER#', '#DB_PASSWORD#'); | |
if (!$db) echo "connection failed"; | |
else echo "connection succeeded"; | |
define('DB_NAME', 'wp_situationalcom_dev'); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment