修正路由无法区分 hello 和 hello/

修正路由无法区分 hello 和  hello/,这应该是两个地址,一个是文件,一个是路径
This commit is contained in:
Moobusy
2016-05-23 18:46:34 +08:00
parent 87d544f331
commit 1f4cb837f0

View File

@@ -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;
}