Home  >  Article  >  php教程  >  php安全配置 关闭php执行系统指令函数

php安全配置 关闭php执行系统指令函数

WBOY
WBOYOriginal
2016-06-13 10:13:021538browse

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