feat: 本次提交更新内容如下
php有问题,覆盖下
This commit is contained in:
@@ -13,12 +13,19 @@ namespace think\config\driver;
|
||||
|
||||
class Json
|
||||
{
|
||||
public function parse($config)
|
||||
protected $config;
|
||||
|
||||
public function __construct($config)
|
||||
{
|
||||
if (is_file($config)) {
|
||||
$config = file_get_contents($config);
|
||||
}
|
||||
$result = json_decode($config, true);
|
||||
return $result;
|
||||
|
||||
$this->config = $config;
|
||||
}
|
||||
|
||||
public function parse()
|
||||
{
|
||||
return json_decode($this->config, true);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user