Guest User

Untitled

a guest
Feb 21st, 2018
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. <?php
  2.  
  3. $dsn = "mysql:dbname=...;host=...";
  4. $dbuser = "...";
  5. $dbpass = "...";
  6.  
  7. try {
  8.  
  9. $pdo = new PDO($dsn, $dbuser, $dbpass);
  10.  
  11. echo "Conexão estabelecida com sucesso!";
  12.  
  13. } catch (PDOException $e) {
  14.  
  15. echo "ERRO: " . $e->getMessage();
  16.  
  17. }
  18.  
  19. ?>
Add Comment
Please, Sign In to add comment