扫描二维码下载沐宇APP

沐宇

微信扫码使用沐宇小程序

沐宇

如何修复thinkphp漏洞

扬州沐宇科技
2021-02-07 16:11:39

如何修复thinkphp漏洞

修复thinkphp安全漏洞的方法

1.首先,在计算机中打开thinkphp安装目录;

2.进入到thinkphp安装目录后,在目录中查找到App.php文件,App.php文件位置:thinkphp/library/think/App.php;

3.查找到App.php文件后,使用记事本打开;

4.最后,App.php文件打开后,在文件中添加以下配置即可;

if (!preg_match(’/1(\w|.)*$/’, $controller)) {

throw new HttpException(404, ‘controller not exists:’ . $controller);

}

扫码添加客服微信