fork download
  1. <?php
  2.  
  3. /*
  4.  * To change this license header, choose License Headers in Project Properties.
  5.  * To change this template file, choose Tools | Templates
  6.  * and open the template in the editor.
  7.  */
  8.  
  9. $servername = "jdbc:mysql://localhost:3306/testPHP";
  10. $username = "root";
  11. $password = "";
  12.  
  13. $conn = new mysqli($servername, $username, $password);
  14.  
  15. if ($conn->connect_error) {
  16. die("Connection failed: " . $conn->connect_error);
  17. }
  18. echo "Connected successfully";
  19.  
  20.  
  21. ?>
Runtime error #stdin #stdout #stderr 0.02s 24448KB
stdin
Standard input is empty
stdout
Standard output is empty
stderr
PHP Fatal error:  Class 'mysqli' not found in /home/WSX01T/prog.php on line 13