Advertisement
brainode

ConnectDB

Feb 10th, 2014
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.65 KB | None | 0 0
  1. <?php
  2. /**
  3.  * Created by PhpStorm.
  4.  * User: asus
  5.  * Date: 2/10/14
  6.  * Time: 4:52 PM
  7.  */
  8.  
  9. namespace core;
  10.  
  11.  
  12. abstract class connect{
  13.     private $db_host,$db_name,$db_login,$db_pass;
  14.     protected $connect;
  15.     protected  function connect($db_host,$db_name,$db_login,$db_pass){
  16.         $this->$connect=mysqli_connect($db_host,$db_login,$db_pass,$db_name);
  17.         return $this->$connect;
  18.     }
  19.     public function __construct($db_host,$db_name,$db_login,$db_pass,$connect){
  20.         $this->db_host="localhost";
  21.         $this->db_name="******";
  22.         $this->db_login="*****";
  23.         $this->db_pass="******";
  24.         $this->connect=false;
  25.     }
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement