mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进
This commit is contained in:
@@ -11,8 +11,6 @@
|
|||||||
|
|
||||||
namespace think;
|
namespace think;
|
||||||
|
|
||||||
use think\App;
|
|
||||||
|
|
||||||
class Config
|
class Config
|
||||||
{
|
{
|
||||||
// 配置参数
|
// 配置参数
|
||||||
@@ -42,7 +40,7 @@ class Config
|
|||||||
if (empty($type)) {
|
if (empty($type)) {
|
||||||
$type = pathinfo($config, PATHINFO_EXTENSION);
|
$type = pathinfo($config, PATHINFO_EXTENSION);
|
||||||
}
|
}
|
||||||
$class = strpos($type, '\\') ? $type : '\\think\\config\\driver\\' . ucwords($type);
|
$class = false !== strpos($type, '\\') ? $type : '\\think\\config\\driver\\' . ucwords($type);
|
||||||
self::set((new $class())->parse($config), $name, $range);
|
self::set((new $class())->parse($config), $name, $range);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user