From 5ad64223bbdfca29f9100c7a07e01a7b180f2190 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Wed, 21 Sep 2016 17:03:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9BRoute=E7=B1=BB=E8=B7=AF?= =?UTF-8?q?=E7=94=B1=E5=88=B0=E7=B1=BB=E7=9A=84=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 8e37bfc0..fe96e777 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -1402,8 +1402,9 @@ class Route } elseif (0 === strpos($route, '/') || 0 === strpos($route, 'http')) { // 路由到重定向地址 $result = ['type' => 'redirect', 'url' => $route, 'status' => isset($option['status']) ? $option['status'] : 301]; - } elseif (0 === strpos($route, '\\')) { + } elseif (strpos($route, '\\')) { // 路由到方法 + $route = str_replace('/', '@', $route); $method = strpos($route, '@') ? explode('@', $route) : $route; $result = ['type' => 'method', 'method' => $method]; } elseif (0 === strpos($route, '@')) {