From cd8a9078d522dbd472556f5be0bd1512d27d0f0d Mon Sep 17 00:00:00 2001 From: thisgun Date: Mon, 14 Aug 2017 17:04:11 +0900 Subject: [PATCH] =?UTF-8?q?433=20=ED=8F=AC=ED=8A=B8=EB=B2=88=ED=98=B8=20?= =?UTF-8?q?=EC=B2=98=EB=A6=AC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common.php b/common.php index da867ec16..d0ed644af 100644 --- a/common.php +++ b/common.php @@ -34,7 +34,7 @@ function g5_path() $document_root = str_replace($tilde_remove, '', $_SERVER['SCRIPT_FILENAME']); $pattern = '/' . preg_quote($document_root, '/') . '/i'; $root = preg_replace($pattern, '', $result['path']); - $port = $_SERVER['SERVER_PORT'] != 80 ? ':'.$_SERVER['SERVER_PORT'] : ''; + $port = ($_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 443) ? '' : ':'.$_SERVER['SERVER_PORT']; $http = 'http' . ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') ? 's' : '') . '://'; $user = str_replace(preg_replace($pattern, '', $_SERVER['SCRIPT_FILENAME']), '', $_SERVER['SCRIPT_NAME']); $host = isset($_SERVER['HTTP_HOST']) ? $_SERVER['HTTP_HOST'] : $_SERVER['SERVER_NAME'];