mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 11:27:17 +08:00
fix: PHP 版本字符串
This commit is contained in:
@@ -10,7 +10,7 @@ type Add struct {
|
||||
Domains []string `form:"domains" json:"domains"`
|
||||
Ports []uint `form:"ports" json:"ports"`
|
||||
Path string `form:"path" json:"path"`
|
||||
Php int `form:"php" json:"php"`
|
||||
Php string `form:"php" json:"php"`
|
||||
Db bool `form:"db" json:"db"`
|
||||
DbType string `form:"db_type" json:"db_type"`
|
||||
DbName string `form:"db_name" json:"db_name"`
|
||||
|
||||
@@ -6,9 +6,9 @@ import (
|
||||
|
||||
type Website struct {
|
||||
ID uint `gorm:"primaryKey" json:"id"`
|
||||
Name string `gorm:"unique;not null" json:"name"`
|
||||
Status bool `gorm:"default:true;not null;index" json:"status"`
|
||||
Path string `gorm:"not null" json:"path"`
|
||||
Name string `json:"name"`
|
||||
Status bool `gorm:"default:true" json:"status"`
|
||||
Path string `json:"path"`
|
||||
Php int `gorm:"default:0;not null;index" json:"php"`
|
||||
Ssl bool `gorm:"default:false;not null;index" json:"ssl"`
|
||||
Remark string `gorm:"default:''" json:"remark"`
|
||||
|
||||
@@ -46,7 +46,7 @@ func (r *WebsiteImpl) Add(website internal.PanelWebsite) (models.Website, error)
|
||||
Name: website.Name,
|
||||
Status: website.Status,
|
||||
Path: website.Path,
|
||||
Php: website.Php,
|
||||
Php: cast.ToInt(website.Php),
|
||||
Ssl: website.Ssl,
|
||||
Remark: website.Remark,
|
||||
}
|
||||
@@ -161,7 +161,7 @@ server
|
||||
# ssl标记位结束
|
||||
|
||||
# php标记位开始
|
||||
include enable-php-%d.conf;
|
||||
include enable-php-%s.conf;
|
||||
# php标记位结束
|
||||
|
||||
# waf标记位开始
|
||||
@@ -514,7 +514,7 @@ func (r *WebsiteImpl) GetConfig(id uint) (internal.WebsiteSetting, error) {
|
||||
setting.Name = website.Name
|
||||
setting.Path = website.Path
|
||||
setting.Ssl = website.Ssl
|
||||
setting.Php = website.Php
|
||||
setting.Php = strconv.Itoa(website.Php)
|
||||
setting.Raw = config
|
||||
|
||||
ports := tools.Cut(config, "# port标记位开始", "# port标记位结束")
|
||||
|
||||
@@ -20,7 +20,7 @@ type PanelWebsite struct {
|
||||
Domains []string `json:"domains"`
|
||||
Ports []uint `json:"ports"`
|
||||
Path string `json:"path"`
|
||||
Php int `json:"php"`
|
||||
Php string `json:"php"`
|
||||
Ssl bool `json:"ssl"`
|
||||
Remark string `json:"remark"`
|
||||
Db bool `json:"db"`
|
||||
@@ -38,7 +38,7 @@ type WebsiteSetting struct {
|
||||
Root string `json:"root"`
|
||||
Path string `json:"path"`
|
||||
Index string `json:"index"`
|
||||
Php int `json:"php"`
|
||||
Php string `json:"php"`
|
||||
OpenBasedir bool `json:"open_basedir"`
|
||||
Ssl bool `json:"ssl"`
|
||||
SslCertificate string `json:"ssl_certificate"`
|
||||
|
||||
Reference in New Issue
Block a user