From a03396ba120d8809360d00df038329af87dce0bd Mon Sep 17 00:00:00 2001 From: TL Date: Tue, 6 Sep 2022 10:31:43 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=89=E8=A3=85=E5=BC=95=E5=AF=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- beike/Installer/Helpers/EnvironmentManager.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/beike/Installer/Helpers/EnvironmentManager.php b/beike/Installer/Helpers/EnvironmentManager.php index 63d566d6..db0bf086 100644 --- a/beike/Installer/Helpers/EnvironmentManager.php +++ b/beike/Installer/Helpers/EnvironmentManager.php @@ -94,7 +94,18 @@ class EnvironmentManager { $results = trans('installer::installer_messages.environment.success'); - $app_url = $_SERVER['APP_URL']; + $app_url = 'http'; + if (isset($_SERVER["HTTPS"]) && $_SERVER["HTTPS"] == "on") + { + $app_url .= "s"; + } + $app_url .= "://"; + if ($_SERVER["SERVER_PORT"] != "80") + { + $app_url .= $_SERVER["SERVER_NAME"] . ":" . $_SERVER["SERVER_PORT"] ; + } else { + $app_url .= $_SERVER["SERVER_NAME"]; + } $envFileData = 'APP_NAME=\''.$request->app_name."'\n".