web\Request getHostInfo()

getHostInfo() public method

Returns the schema and host part of the current request URL.

The returned URL does not have an ending slash. By default this is determined based on the user request information. You may explicitly specify it by setting the hostInfo property.

See also setHostInfo().

public string|null getHostInfo ( )
return string|null

Schema and hostname part (with port number if needed) of the request URL (e.g. http://www.yiiframework.com), null if can't be obtained from $_SERVER and wasn't set.

doc_Yii
2016-10-30 17:15:48
Comments
Leave a Comment

Please login to continue.