Ejemplo n.º 1
0
 /**
  * constructor read config-file and initializes the vars
  *
  * @param   string  config-file-location
  * 
  * @access  public
  *
  * @author  patrick.kracht
  */
 public function __construct($config_file = "./configs/mssql.conf.php")
 {
     self::$is_active = false;
     if (file_exists($config_file)) {
         // import settings for connection
         include $config_file;
     } else {
         trigger_error('Konfigurationsdatei (' . $config_file . ') konnte nicht gefunden werden!');
     }
     // initialize
     self::$query_key = 0;
     self::$link_id = false;
     self::$query_id = false;
     self::$query_list = array();
     self::$database = $database;
     self::$password = $password;
     self::$hostname = isset($hostname) ? gethostbyname($hostname) : '127.0.0.1';
     self::$hostport = isset($hostport) ? $hostport : '1433';
     self::$logging = isset($logging) ? $logging : false;
     self::$username = isset($username) ? $username : self::$database;
     self::init();
 }