Пример #1
0
 public function __construct() {
   if(!is_array(self::$free)) self::$free = array(); 
   if(!is_array(self::$busy)) self::$busy = array(); 
   $dir = dirname(__FILE__);
   $conf = parse_ini_file($dir.'/../../../conf/obm_conf.ini');
   $this->database = $conf['db'];
   $this->host = $conf['host'];
   $this->user = $conf['user'];
   $this->password = $conf['password'];
   if(strtoupper($conf['dbtype']) == 'PGSQL') {
     include_once($dir.'/../lib/pgsql.inc');
   } elseif (strtoupper($conf['dbtype']) == 'MYSQL') {
     include_once($dir.'/../lib/mysql.inc');
   }
 }