fixed:模块Json文件无法写入
This commit is contained in:
parent
5979088144
commit
45712076d2
@ -227,6 +227,10 @@ class CatchAdmin
|
||||
|
||||
$info['enable'] = true;
|
||||
|
||||
if (!is_writeable($moduleJson)) {
|
||||
chmod($moduleJson, 666);
|
||||
}
|
||||
|
||||
file_put_contents($moduleJson, \json_encode($info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE));
|
||||
|
||||
return true;
|
||||
@ -251,6 +255,10 @@ class CatchAdmin
|
||||
|
||||
$info['enable'] = false;
|
||||
|
||||
if (!is_writeable($moduleJson)) {
|
||||
chmod($moduleJson, 666);
|
||||
}
|
||||
|
||||
file_put_contents($moduleJson, \json_encode($info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE));
|
||||
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user