mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 12:42:48 +08:00
改进Request类的domain方法 包含端口
This commit is contained in:
@@ -25,7 +25,7 @@ class Request
|
||||
|
||||
protected $method;
|
||||
/**
|
||||
* @var string 域名
|
||||
* @var string 域名(含协议和端口)
|
||||
*/
|
||||
protected $domain;
|
||||
|
||||
@@ -270,6 +270,9 @@ class Request
|
||||
} elseif (!$this->domain) {
|
||||
$this->domain = $this->scheme() . '://' . $this->host();
|
||||
}
|
||||
if (80 != $this->port()) {
|
||||
$this->domain .= ':' . $this->port();
|
||||
}
|
||||
return $this->domain;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user