Created
May 4, 2016 19:15
-
-
Save tiagones/bf750753259033d0c3350591f8230c29 to your computer and use it in GitHub Desktop.
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 What Exact Version PHP & MySQL | |
echo "<h2>Exact Version PHP & MySQL: </h2>"; | |
printf("PHP version: %s\n", PHP_VERSION); | |
$mysql = mysqli_connect('localhost', 'root', ''); | |
## Test the MySQL connection | |
if (mysqli_connect_errno()) { | |
printf("</br> Connection failed: %s\n", mysqli_connect_error()); | |
exit(); | |
} | |
## Print the MySQL server version | |
printf("</br> MySQL server version: %s\n", mysqli_get_server_info($mysql)); | |
##Close the MySQL connection | |
mysqli_close($mysql); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment