src/Leevel/Http/Request.php
protected function parsePathInfo(string $pathInfo): string
    {
        if ($pathInfo) {
            $ext = pathinfo($pathInfo, PATHINFO_EXTENSION);

            if ($ext) {
                $pathInfo = substr($pathInfo, 0, -(strlen($ext) + 1));
            }
        }

        $pathInfo = empty($pathInfo) ? '/' : '/'.ltrim($pathInfo, '/');

        return $pathInfo;
    }
protected function parsePathInfo(string $pathInfo): string
    {
        if ($pathInfo) {
            $ext = pathinfo($pathInfo, PATHINFO_EXTENSION);

            if ($ext) {
                $pathInfo = substr($pathInfo, 0, -(strlen($ext) + 1));
            }
        }

        $pathInfo = empty($pathInfo) ? '/' : '/'.ltrim($pathInfo, '/');

        return $pathInfo;
    }
pathinfo 处理.

@param string $pathInfo

@return string