Home  >  Article  >  Backend Development  >  利用php.ini禁用一些危险php函数_PHP教程

利用php.ini禁用一些危险php函数_PHP教程

WBOY
WBOYOriginal
2016-07-13 17:10:40875browse

在很多时间我们php中的很多函数是没有用上的,而且对网站有存在很大的安全问题,下面我们利用PHP.ini 里有个 disable_functions 开关选项来关闭一些不需要使用的函数。

如果禁止了会出现如下提示

Warning: phpinfo() has been disabled for security reasons

屏蔽函数实例:

 代码如下 复制代码
disable_functions= phpinfo,dl, exec, system

注意:有些朋友想利用disable_functions来禁止eval函数,这个是不可以禁用的哦,至于原因我告诉你他不是系统函数,具体的大家可查一下。

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/629661.htmlTechArticle在很多时间我们php中的很多函数是没有用上的,而且对网站有存在很大的安全问题,下面我们利用PHP.ini 里有个 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