/** * 加载配制文件 * * @param unknown $type * @throws Yaf_Exception */ public static function loadConfig($type) { if (file_exists(CONF_PATH . '/' . self::getChannel() . '/' . $type . '.php')) { $sFile = CONF_PATH . '/' . self::getChannel() . '/' . $type . '.php'; } elseif (file_exists(CONF_PATH . '/' . $type . '.php')) { $sFile = CONF_PATH . '/' . $type . '.php'; } elseif (file_exists(self::getConfPath() . '/' . $type . '.php')) { $sFile = self::getConfPath() . '/' . $type . '.php'; } else { throw new Yaf_Exception('Config file ' . $type . ' not find!'); } $config = self::$_config; include $sFile; self::$_config = $config; self::$_configFiles[$type] = 1; }