From 6cc8c6610d8a1fd0af1439a6fc4e9739b8eedf06 Mon Sep 17 00:00:00 2001 From: gongfuxiang Date: Fri, 14 Mar 2025 10:26:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BB=E5=9F=9F=E5=90=8D=E6=88=AA=E5=8F=96?= =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/core.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/core.php b/public/core.php index 50b2d1a34..5bbf16624 100755 --- a/public/core.php +++ b/public/core.php @@ -76,6 +76,12 @@ if(empty($_SERVER['HTTP_HOST']) || is_numeric(str_replace('.', '', $_SERVER['HTT $main_domain = $arr[$len-2].'.'.$arr[$len-1]; } } + // 去掉端口 + if(!empty($main_domain) && stripos($main_domain, ':') !== false) + { + $arr = explode(':', $main_domain); + $main_domain = $arr[0]; + } } define('__MY_MAIN_DOMAIN__', $main_domain);