From 59dc931616cf5bdcf3bb29d50f8082e75c09a2d1 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 2 Aug 2017 13:39:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Config.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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;