Advertisement
Guest User

Untitled

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