改进App类

This commit is contained in:
thinkphp
2016-05-07 18:20:04 +08:00
parent f495332abc
commit 3b3751f3d5
3 changed files with 29 additions and 74 deletions

View File

@@ -108,7 +108,7 @@ class Request
public static function pathinfo()
{
if (is_null(self::$pathinfo)) {
if (Config::get('var_pathinfo')) {
if (isset($_GET[Config::get('var_pathinfo')])) {
// 判断URL里面是否有兼容模式参数
$_SERVER['PATH_INFO'] = $_GET[Config::get('var_pathinfo')];
unset($_GET[Config::get('var_pathinfo')]);
@@ -442,9 +442,8 @@ class Request
{
if (!empty($type)) {
self::$dispatch = $dispatch;
} else {
return self::$dispatch;
}
return self::$dispatch;
}
}