public function urlPath($withParams = false)
    {
        $path = $this->server('request_uri');

        if (!$withParams)
        {
            $position = mb_strpos($path, '?');
            if ($position !== false)
            {
                $path = mb_substr($path, 0, $position);
            }
        }

        return $path;
    }
public function urlPath($withParams = false)
    {
        $path = $this->server('request_uri');

        if (!$withParams)
        {
            $position = mb_strpos($path, '?');
            if ($position !== false)
            {
                $path = mb_substr($path, 0, $position);
            }
        }

        return $path;
    }
public function urlPath ( $ withParams = false ) { $ path = $ this -> server ( 'request_uri' ) ; if ( ! $ withParams ) { $ position = mb_strpos ( $ path , '?' ) ; if ( $ position !== false ) { $ path = mb_substr ( $ path , 0 , $ position ) ; } } return $ path ; }
without host & schema

@param bool $withParams

@return string
without host & schema