Home > php教程 > php手册 > body text

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

WBOY
Release: 2016-06-13 10:13:02
Original
1637 people have browsed it

php的四个函数exec,shell_exec,system,passthru可以执行系统指令,对系统安全构成威胁,如果不用的话可以将其关闭

 代码如下 复制代码

vim /etc/php.ini

去掉disable_functions前注释,编辑内容如下

 代码如下 复制代码

disable_functions = exec,shell_exec,system,passthru,popen


友情提示,有朋友说想过滤eval函数,在php中这个不是函数无法在disable_functions禁止的哦

source:php.cn
Statement of this Website
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
Popular Recommendations
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template