From f11c53db7c511888f6098e995b23a741be71222d Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 31 Oct 2016 08:13:15 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E6=8E=A7=E5=88=B6=E5=99=A8?= =?UTF-8?q?=E8=87=AA=E5=8A=A8=E6=90=9C=E7=B4=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Route.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/library/think/Route.php b/library/think/Route.php index 395b07cc..ccadee80 100644 --- a/library/think/Route.php +++ b/library/think/Route.php @@ -1212,7 +1212,9 @@ class Route $find = false; foreach ($path as $val) { $item[] = $val; - if (is_file($dir . DS . str_replace('.', DS, $val) . $suffix . EXT)) { + $file = $dir . DS . str_replace('.', DS, $val) . $suffix . EXT; + $file = pathinfo($file, PATHINFO_DIRNAME) . DS . Loader::parseName(pathinfo($file, PATHINFO_FILENAME), 1) . EXT; + if (is_file($file)) { $find = true; break; } else {