解析如何屏蔽php中的phpinfo()函数

yipeiwu_com6年前PHP代码库

我们配置php环境的时候往往都会写phpinfo();这个函数来测试php环境是否安装成功,但往往这个函数也会给系统带来安全隐患,那么如何让关掉这个函数呢?下面介绍一种方法:
修改php.ini文件,在里面找到如下行

复制代码 代码如下:

disable_functions = ; This directive allows you to disable certain
; functions for security reasons. It receives
; a comma separated list of function names.
; This directive is *NOT* affected by whether
; Safe Mode is turned on or off.

将其写成
disble_functions = phpinfo
重启apache就能实现屏蔽phpinfo();函数了。

相关文章

SSI指令

什么是 SHTML 使用SSI(Server Side Include)的html文件扩展名,SSI(Server Side Inclu...

在PHP中使用Sockets 从Usenet中获取文件

作者:Armel Fauveau  原文地址:http://www.phpbuilder.net/columns/armel20010427.php3 PHP能够打开...

php列出一个目录下的所有文件的代码

复制代码 代码如下: <?php function dir_path($path) { $path = str_replace('\\', '/', $path); if (sub...

php求数组全排列,元素所有组合的方法总结

本文实例讲述了php求数组全排列,元素所有组合的方法总结。 分享给大家供大家参考,具体如下: <?php $source = array('pll','我','爱',...

php class中self,parent,this的区别以及实例介绍

一,this 1,要用this,你必有是一个对像的形势,不然它会报错的,Fatal error: Using $this when not in object context。2,th...