Created
December 23, 2014 09:46
-
-
Save mayukojpn/44d1cf353b42222c8d65 to your computer and use it in GitHub Desktop.
PHP から MySQL に接続してみるテスト
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
<html> | |
<head><title>MySQL Connection</title></head> | |
<body> | |
<?php | |
$link = mysql_connect('server','user_name','user_pass'); | |
if (!$link) { | |
die('failed'.mysql_error()); | |
} | |
print('<p>connection succeed!</p>'); | |
$close_flag = mysql_close($link); | |
if ($close_flag){ | |
print('<p>Closing succeed.</p>'); | |
} | |
?> | |
</body> | |
</html> | |
~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment