src/Http/Request.php
function getBaseUrl($absolute = false)
    {
        if ($this->baseUrl === null) {
            $this->baseUrl = rtrim(dirname($this->getScriptUrl()), '\\/.');
        }
        return $absolute ? $this->getHostInfo() . $this->baseUrl : $this->baseUrl;
    }
function getBaseUrl($absolute = false)
    {
        if ($this->baseUrl === null) {
            $this->baseUrl = rtrim(dirname($this->getScriptUrl()), '\\/.');
        }
        return $absolute ? $this->getHostInfo() . $this->baseUrl : $this->baseUrl;
    }
返回当前URL绝对路径

@param  boolean $absolute 是否返回带HOST的绝对路径
@return string 当前请求的url
@throws FrontException