web\UrlManager getBaseUrl()

getBaseUrl() public method

Returns the base URL that is used by createUrl() to prepend to created URLs.

It defaults to yii\web\Request::$baseUrl. This is mainly used when $enablePrettyUrl is true and $showScriptName is false.

public string getBaseUrl ( )
return string

The base URL that is used by createUrl() to prepend to created URLs.

throws yii\base\InvalidConfigException

if running in console application and $baseUrl is not configured.

doc_Yii
2016-10-30 17:17:00
Comments
Leave a Comment

Please login to continue.