改进配置文件读取

This commit is contained in:
thinkphp
2017-06-12 11:04:13 +08:00
parent 0e2bab2804
commit 9a53fc7934

View File

@@ -492,7 +492,7 @@ class App
$dir = CONF_PATH . $module . 'extra';
$files = scandir($dir);
foreach ($files as $file) {
if (pathinfo($file, PATHINFO_EXTENSION) === CONF_EXT) {
if ('.' . pathinfo($file, PATHINFO_EXTENSION) === CONF_EXT) {
$filename = $dir . DS . $file;
Config::load($filename, pathinfo($file, PATHINFO_FILENAME));
}