} // 自动读取配置文件 if (is_dir($path . 'config')) { $dir = $path . 'config'; } elseif (is_dir($this->configPath . $module)) { $dir = $this->configPath . $module; } $files = isset($dir) ? scandir($dir) : []; foreach ($files as $file) { if ('.' . pathinfo($file, PATHINFO_EXTENSION) === $this->configExt) { $filename = $dir . DIRECTORY_SEPARATOR . $file; $this->config->load($filename, pathinfo($file, PATHINFO_FILENAME)); } }