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

关闭php执行系统指令函数

WBOY
Release: 2016-05-25 16:41:34
Original
903 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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!