From 87e7d63c707af86c833a567517c0c4f2035fef55 Mon Sep 17 00:00:00 2001 From: devil Date: Tue, 31 Mar 2020 13:09:22 +0800 Subject: [PATCH] =?UTF-8?q?tp=E6=BC=8F=E6=B4=9E=E5=90=8C=E6=AD=A5=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thinkphp/library/think/route/dispatch/Url.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/thinkphp/library/think/route/dispatch/Url.php b/thinkphp/library/think/route/dispatch/Url.php index 00dc8cca3..5160cba19 100755 --- a/thinkphp/library/think/route/dispatch/Url.php +++ b/thinkphp/library/think/route/dispatch/Url.php @@ -60,7 +60,7 @@ class Url extends Dispatch $controller = !empty($path) ? array_shift($path) : null; } - if ($controller && !preg_match('/^[A-Za-z][\w|\.]*$/', $controller)) { + if ($controller && !preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) { throw new HttpException(404, 'controller not exists:' . $controller); }