Advertisement
gilzow

PHP MySQLnd Native Driver

Oct 30th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.78 KB | None | 0 0
  1. <?php
  2. $boolHasMySQL = false;
  3. $boolHasMySQLi = false;
  4. $boolHasMySQLnd = false;
  5. $strSentence = '<p>';
  6. if (function_exists('mysql_connect')) {
  7.     $boolHasMySQL = true;
  8.     $strSentence.= "(Deprecated) MySQL <b>is installed</b> ";
  9. } else
  10.     $strSentence.= "(Deprecated) MySQL <b>is not</b> installed ";
  11. if (function_exists('mysqli_connect')) {
  12.     $boolHasMySQLi = true;
  13.     $strSentence.= "and the new (improved) MySQL <b>is installed</b>. ";
  14. } else
  15.     $strSentence.= "and the new (improved) MySQL <b>is not installed</b>. ";
  16.  
  17. if (function_exists('mysqli_get_client_stats')) {
  18.     $boolHasMySQLnd = true;
  19.     $strSentence.= "This server is using MySQLnd as the driver.";
  20. } else
  21.     $strSentence.= "This server is using libmysqlclient as the driver.";
  22.  
  23. echo $strSentence,'</p>';
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement