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

如何禁止 PHP 执行某些系统命令

WBOY
Release: 2016-06-21 08:58:47
Original
1233 people have browsed it

执行

很多命令如 shell_exec、system、passthru、popen 等都是系统相关的合作,如果虚拟主机开放给使用者使用,或是在系统权限没设定完整的情况下,必然会造成很大的伤害。
要达到这个需求,只要在 php.ini 里设定 disble_function 这个选项就能设定禁止执行的指令了。
范例:
disble_function = phpinfo
要多个指令的话,用逗点隔开,如:
disble_function = shell_exec, system, passthru, popen



Related labels:
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