关闭php执行系统指令函数
php的四个函数exec,shell_exec,system,passthru可以执行系统指令,对系统安全构成威胁,如果不用的话可以将其关闭,代码如下:
vim /etc/php.ini
去掉disable_functions前注释,编辑内容如下:
disable_functions = exec,shell_exec,system,passthru,popen
友情提示,有朋友说想过滤eval函数,在php中这个不是函数无法在disable_functions禁止的.
本文地址:http://www.phprm.com/develop/fs4626.html
转载随意,但请附上文章地址:-)