php的四个函数exec,shell_exec,system,passthru可以执行系统指令,对系统安全构成威胁,如果不用的话可以将其关闭,代码如下:
vim /etc/php.ini
去掉disable_functions前注释,编辑内容如下:
disable_functions = exec,shell_exec,system,passthru,popen
友情提示,有朋友说想过滤eval函数,在php中这个不是函数无法在disable_functions禁止的.
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn