程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫
 程式師世界 >> 編程語言 >> 網頁編程 >> PHP編程 >> 關於PHP編程 >> 解析如何屏蔽php中的phpinfo()函數

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

編輯:關於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();函數了。

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved