2
0
mirror of https://github.com/acepanel/panel.git synced 2026-02-05 00:39:32 +08:00

refactor: 重构 tools.Read 函数

This commit is contained in:
耗子
2023-11-14 02:08:26 +08:00
parent 2b1b58ea2b
commit 83cbae034c
21 changed files with 147 additions and 64 deletions

View File

@@ -102,7 +102,11 @@ func (r *Php82Controller) GetConfig(ctx http.Context) http.Response {
return check
}
config := tools.Read("/www/server/php/" + r.version + "/etc/php.ini")
config, err := tools.Read("/www/server/php/" + r.version + "/etc/php.ini")
if err != nil {
return controllers.Error(ctx, http.StatusInternalServerError, "获取PHP-"+r.version+"配置失败")
}
return controllers.Success(ctx, config)
}