Advertisement
Guest User

Untitled

a guest
May 4th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.52 KB | None | 0 0
  1. <?php
  2. ##Test What Exact Version PHP & MySQL
  3. echo "<h2>Exact Version PHP & MySQL: </h2>";
  4. printf("PHP version: %s\n", PHP_VERSION);
  5. $mysql = mysqli_connect('localhost', 'root', '');
  6. ## Test the MySQL connection
  7. if (mysqli_connect_errno()) {
  8. printf("</br> Connection failed: %s\n", mysqli_connect_error());
  9. exit();
  10. }
  11. ## Print the MySQL server version
  12. printf("</br> MySQL server version: %s\n", mysqli_get_server_info($mysql));
  13. ##Close the MySQL connection
  14. mysqli_close($mysql);
  15. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement