diff --git a/VerLog.md b/VerLog.md index db4da07..6a32dae 100644 --- a/VerLog.md +++ b/VerLog.md @@ -35,6 +35,7 @@ - 2024 年 2 月 6 日 (17) --修复. 后台邮箱配置端口无法设置问题 --修复. 默认主题的Axios的CDN链接 + --优化. 配置文件更新无权限报错问题 - 2024 年 2 月 1 日 --修复. 后台卡片管理taContact的遗漏 diff --git a/app/common/Config.php b/app/common/Config.php index 6800362..a668d56 100644 --- a/app/common/Config.php +++ b/app/common/Config.php @@ -121,10 +121,11 @@ public function mBoolCoverConfig($filename = '', $data = [], $free = false, $env } //写入并返回结果 - if (!file_put_contents($filename, $str_file)) { - return false; - } else { + try { + file_put_contents($filename, $str_file); return true; + } catch (\Throwable $th) { + return false; } } }