禁用PHP函数,可以对php.ini进行配置

php.ini 里有个 disable_functions 开关选项,此选项可关闭一些危险的函数,比如system,exec 等。比如: disable_functions = phpinfo , 如果在文件中调用 phpinfo() 函数,那么在 error_reporting 开启的情况下,会提示如下错误:

Warning: phpinfo() has been disabled for security reasons

屏蔽函数实例:

disable_functions= phpinfo,dl, exec, system
原文地址:https://www.cnblogs.com/52php/p/5687198.html