Guest User

Untitled

a guest
Aug 14th, 2018
120
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.47 KB | None | 0 0
  1. <?php
  2.  
  3. class Conexao
  4. {
  5.     var $conn;
  6.    
  7.     public static function Abrir()
  8.     {
  9.         try {
  10.            
  11.             $conn = new PDO
  12.  
  13. ("pgsql:dbname=solucoescustom5;user=solucoescustom5;password=v7i6r2z8@;host=postgresql05.solucoescustomizadas.com.br");
  14.             return $conn;
  15.            
  16.         }catch (PDOException $e)
  17.         {      
  18.             //echo ("Não é possível neste momento estabelecer conexão com a base de dados. Tente novamente mais tarde!");      
  19.             //exit;
  20.         }
  21.  
  22.         return null;
  23.     }
  24.  
  25. }
  26.  
  27. ?>
Add Comment
Please, Sign In to add comment