From 8e615031115dcbc80fe2863e40dbdeaafed52c66 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Sat, 8 Jul 2017 08:35:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E8=B7=AF=E7=94=B1=E5=88=86?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E5=85=A8=E5=B1=80=E5=AE=8C=E6=95=B4=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=8C=B9=E9=85=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 59b15432..35a57ee2 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -428,7 +428,8 @@ class Route self::$rules['*'][$name]['pattern'] = $pattern; } } else { - $item = []; + $item = []; + $completeMatch = Config::get('route_complete_match'); foreach ($routes as $key => $val) { if (is_numeric($key)) { $key = array_shift($val); @@ -447,6 +448,8 @@ class Route // 是否完整匹配 $options['complete_match'] = true; $key = substr($key, 0, -1); + } elseif ($completeMatch) { + $options['complete_match'] = true; } $key = trim($key, '/'); $vars = self::parseVar($key);