Browse Source

Update:fixed pathinfo bug

Zhu Jinhui 7 years ago
parent
commit
64008101fb
1 changed files with 2 additions and 1 deletions
  1. 2 1
      src/Request/Url.php

+ 2 - 1
src/Request/Url.php

@@ -40,7 +40,8 @@ class Url
      */
     public static function getPathInfo()
     {
-        return PATH_INFO ? PATH_INFO : explode('?', $_SERVER['REQUEST_URI'])[0];
+		$pathinfo = str_replace(pathinfo($_SERVER['PHP_SELF'], PATHINFO_DIRNAME), '', $_SERVER['REQUEST_URI']);
+        return PATH_INFO ? PATH_INFO : explode('?', $pathinfo)[0];
     }
 
     /**