From 54f215456a682e35e29b82c260f1a8e0bfc3dfd3 Mon Sep 17 00:00:00 2001 From: evoxwht <442384644@qq.com> Date: Fri, 28 Apr 2023 11:54:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E5=AE=89=E8=A3=85=E7=A8=8B?= =?UTF-8?q?=E5=BA=8F=EF=BC=8C=E6=9B=B4=E6=96=B0=E6=96=87=E4=BB=B6=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/adminapi/controller/v1/system/SystemFile.php | 1 + crmeb/public/install/index.php | 11 ++++++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/crmeb/app/adminapi/controller/v1/system/SystemFile.php b/crmeb/app/adminapi/controller/v1/system/SystemFile.php index db722d653..89a8f731f 100644 --- a/crmeb/app/adminapi/controller/v1/system/SystemFile.php +++ b/crmeb/app/adminapi/controller/v1/system/SystemFile.php @@ -95,6 +95,7 @@ class SystemFile extends AuthController ['full_path', ''], ['mark', ''], ], true); + $full_path = $this->request->param('full_path'); if ($full_path == '') return app('json')->fail(100100); $this->services->fileMarkSave($full_path, $mark); return app('json')->success(100000); diff --git a/crmeb/public/install/index.php b/crmeb/public/install/index.php index 8299c2427..ae9fae058 100755 --- a/crmeb/public/install/index.php +++ b/crmeb/public/install/index.php @@ -406,7 +406,16 @@ switch ($step) { $res = mysqli_query($conn, $addadminsql); $res2 = true; if (isset($_SERVER['SERVER_NAME'])) { - $site_url = '\'"http://' . $_SERVER['SERVER_NAME'] . '"\''; + if (isset($_SERVER['REQUEST_SCHEME'])) { + $request_scheme = $_SERVER['REQUEST_SCHEME']; + } else { + if ($_SERVER['HTTPS'] == 'on') { + $request_scheme = 'https'; + } else { + $request_scheme = 'http'; + } + } + $site_url = '\'"' . $request_scheme . '://' . $_SERVER['SERVER_NAME'] . '"\''; $res2 = mysqli_query($conn, 'UPDATE `' . $dbPrefix . 'system_config` SET `value`=' . $site_url . ' WHERE `menu_name`="site_url"'); } $arr = array('n' => 999999, 'count' => $counts, 'msg' => '安装完成', 'time' => date('Y-m-d H:i:s'));