diff --git a/library/think/Request.php b/library/think/Request.php index ef9ba1f2..6e032c21 100644 --- a/library/think/Request.php +++ b/library/think/Request.php @@ -324,7 +324,7 @@ class Request } } } - $this->pathinfo = empty($_SERVER['PATH_INFO']) ? '/' : trim($_SERVER['PATH_INFO'], '/'); + $this->pathinfo = empty($_SERVER['PATH_INFO']) ? '/' : ltrim($_SERVER['PATH_INFO'], '/'); } return $this->pathinfo; }