溫馨提示×

如何修復(fù)thinkphp漏洞

九三
205
2021-02-07 16:11:39
欄目: 編程語言

如何修復(fù)thinkphp漏洞

修復(fù)thinkphp安全漏洞的方法

1.首先,在計算機(jī)中打開thinkphp安裝目錄;

2.進(jìn)入到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);

}

0