改进Config类load方法 一级配置名称强制转为小写

This commit is contained in:
thinkphp
2016-10-27 14:18:44 +08:00
parent 40dd37e374
commit eed8bfb12d

View File

@@ -59,6 +59,7 @@ class Config
self::$config[$range] = [];
}
if (is_file($file)) {
$name = strtolower($name);
$type = pathinfo($file, PATHINFO_EXTENSION);
if ('php' == $type) {
return self::set(include $file, $name, $range);