From 24414adfee78dd6605c2c1f295070aba5688b3bf Mon Sep 17 00:00:00 2001 From: thinkphp Date: Fri, 8 Jan 2016 09:17:21 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AE=8C=E6=95=B4url?= =?UTF-8?q?=E5=8F=98=E9=87=8F=E8=A7=84=E5=88=99=E6=94=AF=E6=8C=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/think/Route.php b/library/think/Route.php index f4967167..a2e175ae 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -401,6 +401,10 @@ class Route */ private static function checkRule($rule, $route, $url, $pattern) { + // 检查完整规则定义 + if (isset($pattern['__url__']) && !preg_match($pattern['__url__'], $url)) { + return false; + } // 检测是否设置了参数分隔符 if ($depr = Config::get('url_params_depr')) { $url = str_replace($depr, '/', $url);