mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-01 20:52:48 +08:00
改进控制器获取
This commit is contained in:
@@ -551,6 +551,11 @@ class App
|
||||
|
||||
// 获取控制器名
|
||||
$controller = strip_tags($result[1] ?: $config['default_controller']);
|
||||
|
||||
if (!preg_match('/^[A-Za-z](\w)*$/', $controller)) {
|
||||
throw new HttpException(404, 'controller not exists:' . $controller);
|
||||
}
|
||||
|
||||
$controller = $convert ? strtolower($controller) : $controller;
|
||||
|
||||
// 获取操作名
|
||||
|
||||
Reference in New Issue
Block a user