Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- namespace connections;
- require_once 'connections/user/defines.php';
- use connections\user\defines;
- class ConexaoDB{
- private static $conn;
- const CONEXAO = array("host"=>HOST,"db"=>DATABASE,"user"=>USER,"pass"=>PASSWORD);
- function __construct(){
- $user = self::CONEXAO['user'];
- $pass = self::CONEXAO['pass'];
- self::$conn = new \PDO('mysql:host='.self::CONEXAO['host'].';dbname='.self::CONEXAO['db'],$user,$pass);
- }
- public function getConn(){
- return self::$conn;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement