mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 07:02:47 +08:00
改进Config类和App类 Lange类
支持扩展配置文件分离
This commit is contained in:
@@ -37,7 +37,8 @@ class Config
|
||||
// 加载配置文件
|
||||
public static function load($file, $name = '', $range = '')
|
||||
{
|
||||
return self::set(include $file, $name, $range);
|
||||
$file = is_file($file) ? $file : APP_PATH . $file . EXT;
|
||||
return is_file($file) ? self::set(include $file, $name, $range) : self::$config[$range];
|
||||
}
|
||||
|
||||
// 检测配置是否存在
|
||||
|
||||
Reference in New Issue
Block a user