Returns the base URL of the current request.
public static base ( boolean | string $scheme = false ) : string | ||
$scheme | boolean | string | the URI scheme to use in the returned base URL: - `false` (default): returning the base URL without host info. - `true`: returning an absolute base URL whose scheme is the same as that in [[\yii\web\UrlManager::$hostInfo]]. - string: returning an absolute base URL with the specified scheme (either `http`, `https` or empty string for protocol-relative URL). |
Résultat | string |