/** * 构造函数,加载配置 */ public final function __construct() { // 读取配置 $this->driver = new Ini(CONF_PATH . "driver.ini", Application::app()->environ()); $this->driver = $this->driver->toArray(); // 获取数据库对象 $this->db = Mysql::getInstance($this->driver['mysql'][$this->adapter]); }