添加url_pathinfo_rule参数用于设置模块的PATHINFO URL规则

例如:
'url_pathinfo_rule' =>  'c/id?a=index',
This commit is contained in:
thinkphp
2013-03-14 14:14:41 +08:00
parent b96c650a1e
commit 90fac61dea
3 changed files with 48 additions and 30 deletions

View File

@@ -15,6 +15,9 @@ class Route {
static public function check($regx,$rules) {
// 优先检测是否存在PATH_INFO
if(empty($regx)) return true;
if(!Config::get('url_route')) {
return false;
}
// 路由处理
if(!empty($rules)) {
// 分隔符替换 确保路由定义使用统一的分隔符