这个是阿里云提供的解决方法:
在think\App类的module方法的获取控制器的代码后面加上
if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
这个文件/thinkphp/library/think/App.php
这样可以吗?具体加再那个地方呢?
最佳答案

if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
这个文件