Guest User

Untitled

a guest
Feb 7th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.30 KB | None | 0 0
  1. <?php
  2.  
  3. $DBhost = "localhost";
  4. $DBuser = "homestead";
  5. $DBpass = "secret";
  6. $DBname = "dbjson";
  7.  
  8. try{
  9.  
  10. $DBcon = new PDO("mysql:host=$DBhost;dbname=$DBname",$DBuser,$DBpass);
  11. $DBcon->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
  12.  
  13. }catch(PDOException $ex){
  14.  
  15. die($ex->getMessage());
  16. }
Add Comment
Please, Sign In to add comment