我们只要在php.ini增加
disable_functions =phpinfo
php.ini里引入了一项功能disable_functions , 这个功能比较有用,可以用它禁止一些函数。比如在php.ini里加上disable_functions = passthru exec system popen 那么在执行这些函数的时候将会提示warning: system() has been disabled for security reasons,同时程序终止运行
更多详细
查找disable_functions然后用下面的替换
disable_functions =phpinfo,exec,passthru,shell_exec,system,proc_open,popen,curl_exec,curl_multi_exec,parse_ini_file,show_source
本文介绍了如何在php.ini中使用disable_functions功能禁用危险函数,如passthru、exec和system,以防止潜在的安全风险并确保代码执行的可控性。
1176

被折叠的 条评论
为什么被折叠?



