Advertisement
Guest User

Untitled

a guest
Nov 20th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. <?php
  2.  
  3. $host = "empty"; //Host of database connection
  4. $user = "empty";//User name of database
  5. $pass = "empty"; //Database Password
  6. $db = "empty"; //Database name
  7.  
  8.  
  9. $con = mysqli_connect($host,$user,$pass,$db);//Initiate Connection
  10.  
  11. // Check connection
  12. if (mysqli_connect_errno())
  13. {
  14. //Log any errors
  15. $log = "Failed to connect to MySQL: " . mysqli_connect_error();
  16. file_put_contents('./log_'.date("j.n.Y G:i").'.txt', $log);
  17. }
  18.  
  19. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement