From 26d970a203e3fb3855e50b51285f6fdfd42676af Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 25 Jan 2016 22:00:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BApp=E7=B1=BB=E7=9A=84?= =?UTF-8?q?=E7=8B=AC=E7=AB=8B=E9=85=8D=E7=BD=AE=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/App.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/library/think/App.php b/library/think/App.php index fac13095..9b12b9ae 100644 --- a/library/think/App.php +++ b/library/think/App.php @@ -33,8 +33,9 @@ class App // 读取扩展配置文件 if (Config::get('extra_config_list')) { - foreach (Config::get('extra_config_list') as $file) { - Config::load(APP_PATH . $file . EXT, $file); + foreach (Config::get('extra_config_list') as $name => $file) { + $file = strpos($file, '.') ? $file : APP_PATH . $file . EXT; + Config::load($file, is_string($name) ? $name : pathinfo($file, PATHINFO_FILENAME)); } }