Home > Backend Development > PHP Tutorial > Analysis of how to block the phpinfo() function in php_PHP tutorial

Analysis of how to block the phpinfo() function in php_PHP tutorial

WBOY
Release: 2016-07-21 15:08:33
Original
1045 people have browsed it

When we configure the PHP environment, we often write phpinfo(); this function is used to test whether the PHP environment is installed successfully, but often this function also brings security risks to the system, so how to turn off this function? Here is a method:
Modify the php.ini file and find the following line in it ,

Copy the code The code is as follows:

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.

Write it as
disble_functions = phpinfo
Restart apache to block the phpinfo(); function.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/327443.htmlTechArticleWhen we configure the php environment, we often write phpinfo(); this function is used to test whether the php environment is installed successfully, but Often this function will also bring security risks to the system, so how to make...
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 Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template