mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 23:22:48 +08:00
改进控制器自动搜索
This commit is contained in:
@@ -1212,7 +1212,9 @@ class Route
|
|||||||
$find = false;
|
$find = false;
|
||||||
foreach ($path as $val) {
|
foreach ($path as $val) {
|
||||||
$item[] = $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;
|
$find = true;
|
||||||
break;
|
break;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user