From ae7b2f49b00c6a98e176ce59d113b9f8a05c112d Mon Sep 17 00:00:00 2001 From: tridays Date: Thu, 27 Aug 2015 21:09:24 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E6=A3=80=E6=B5=8B=E4=B8=8D?= =?UTF-8?q?=E5=88=B0=20$=5Fserver['SERVER=5FPORT']=20=E5=AF=BC=E8=87=B4?= =?UTF-8?q?=E6=97=A0=E6=B3=95=E8=AE=BF=E9=97=AE=E5=90=8E=E5=8F=B0=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82=20=E4=BF=AE=E6=94=B9=E4=BA=86=20/va?= =?UTF-8?q?r/Typecho/Request.php:222=20=E8=A1=8C=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- var/Typecho/Request.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/var/Typecho/Request.php b/var/Typecho/Request.php index dc5309ee..8d710372 100644 --- a/var/Typecho/Request.php +++ b/var/Typecho/Request.php @@ -218,11 +218,9 @@ class Typecho_Request public static function getUrlPrefix() { if (empty(self::$_urlPrefix)) { - self::$_urlPrefix = (self::isSecure() ? 'https' : 'http') - . '://' . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : - ($_SERVER['SERVER_NAME'] . (in_array($_SERVER['SERVER_PORT'], array(80, 443)) - ? '' : ':' . $_SERVER['SERVER_PORT'])) - ); + self::$_urlPrefix = (self::isSecure() ? 'https' : 'http') . '://' + . (isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME']) + . (empty($_SERVER['SERVER_PORT']) || in_array($_SERVER['SERVER_PORT'], array(80, 443)) ? '' : ':' . $_SERVER['SERVER_PORT']); } return self::$_urlPrefix;