控制器过滤不改下么

浏览:178 发布日期:2019/01/22
5.0.0 - 普通 - 已关闭
if (!preg_match('/^[A-Za-z](\w|\.)*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}


if ($controller && !preg_match('/^[A-Za-z][\w|\.]*$/', $controller)) {
throw new HttpException(404, 'controller not exists:' . $controller);
}
评论(
后面还有条评论,点击查看>>