Guest User

Untitled

a guest
Apr 15th, 2017
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. $serv = "mysql:host=localhost;dbname=test1";
  3. $user = "root";
  4. $pass = "";
  5.  
  6. try{
  7.     $dbCon = new PDO($serv,$user,$pass) ;
  8.     echo"good conect";
  9.     $dbCon->setAttribute(PDO::ATTR_ERRMODE,PDO::ERRMODE_EXCEPTION);
  10. }
  11. catch(PDOException $e){
  12.     echo"error" . $e->getMessage();
  13. }
  14.  
  15. ?>
Add Comment
Please, Sign In to add comment