diff --git a/library/think/Config.php b/library/think/Config.php index 3ba7db66..f0b4bd4f 100644 --- a/library/think/Config.php +++ b/library/think/Config.php @@ -117,7 +117,9 @@ class Config if (!isset(self::$config[$range][$name[0]])) { // 动态载入额外配置 $module = Request::instance()->module(); - self::load(CONF_PATH . ($module ? $module . DS : '') . 'extra' . DS . strtolower($name[0]) . CONF_EXT); + $file = CONF_PATH . ($module ? $module . DS : '') . 'extra' . DS . $name[0] . CONF_EXT; + + is_file($file) && self::load($file, $name[0]); } return isset(self::$config[$range][$name[0]][$name[1]]) ? self::$config[$range][$name[0]][$name[1]] : null;