示例#1
0
文件: config.php 项目: hitzheng/ares
 private static function _load($file)
 {
     $fileList = Core_Loader::getInstance()->getFile($file . PHP_EXT, CONFIG_DIR, true);
     if (empty($fileList)) {
         throw new Exception_Base("config file not found - {$file}");
     }
     $fileList = array_reverse($fileList);
     $config = array();
     foreach ($fileList as $f) {
         $c = (include $f);
         // 让后面覆盖前面的同名配置
         $config = Tool_Array::merge($config, $c);
     }
     self::$_config[$file] = $config;
 }