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