Cml\Http\Request::host PHP Method

host() public static method

获取主机名称
public static host ( ) : string
return string
    public static function host()
    {
        if ($_SERVER['SERVER_NAME']) {
            return strip_tags($_SERVER['SERVER_NAME'] . ($_SERVER['SERVER_PORT'] == '80' ? '' : ':' . $_SERVER['SERVER_PORT']));
        }
        return strip_tags($_SERVER['HTTP_HOST']);
    }