mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 17:17:13 +08:00
refactor: 重构 tools.Read 函数
This commit is contained in:
@@ -102,7 +102,11 @@ func (r *Php80Controller) 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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user