改进Url生成对端口号的支持

This commit is contained in:
thinkphp
2017-07-07 10:41:53 +08:00
parent 7445dce2e8
commit 70a6bff2ab

View File

@@ -272,7 +272,7 @@ class Url
$domain .= '.' . $rootDomain; $domain .= '.' . $rootDomain;
} }
} }
if (false !== strpos($domain, ':')) { if (false !== strpos($domain, '://')) {
$scheme = ''; $scheme = '';
} else { } else {
$scheme = $request->isSsl() || Config::get('is_https') ? 'https://' : 'http://'; $scheme = $request->isSsl() || Config::get('is_https') ? 'https://' : 'http://';