Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Conexao{
- private $host = "localhost";
- private $user = "root";
- private $db = "indicseguros";
- private $pass = "";
- public $conn;
- public function __construct(){
- try{
- $this->conn = new PDO("mysql:host=".$this->host.";dbname=".$this->db,$this->user,$this->pass);
- $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
- return true;
- } catch(PDOException $e) {
- echo "ERRO: ".$e->getMessage();
- return false;
- }
- }
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement