改进控制器获取

This commit is contained in:
thinkphp
2018-12-09 20:15:25 +08:00
parent 7be580f19e
commit b797d72352

View File

@@ -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;
// 获取操作名