mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 15:12:48 +08:00
改进Url生成对完整域名的支持
This commit is contained in:
@@ -268,7 +268,7 @@ class Url
|
|||||||
$host = $request->host();
|
$host = $request->host();
|
||||||
$rootDomain = substr_count($host, '.') > 1 ? substr(strstr($host, '.'), 1) : $host;
|
$rootDomain = substr_count($host, '.') > 1 ? substr(strstr($host, '.'), 1) : $host;
|
||||||
}
|
}
|
||||||
if (!strpos($domain, $rootDomain)) {
|
if (substr_count($domain, '.') < 2 && !strpos($domain, $rootDomain)) {
|
||||||
$domain .= '.' . $rootDomain;
|
$domain .= '.' . $rootDomain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user