改进URL参数获取 保留变量名称大小写

This commit is contained in:
thinkphp
2016-06-25 18:11:24 +08:00
parent 7f13d70d0b
commit f80e82f491

View File

@@ -1212,7 +1212,7 @@ class Route
$var += explode('/', $url); $var += explode('/', $url);
} else { } else {
preg_replace_callback('/(\w+)\/([^\/]+)/', function ($match) use (&$var) { preg_replace_callback('/(\w+)\/([^\/]+)/', function ($match) use (&$var) {
$var[strtolower($match[1])] = strip_tags($match[2]); $var[$match[1]] = strip_tags($match[2]);
}, $url); }, $url);
} }
} }