Resolve how to block the phpinfo () function in php. We usually write phpinfo () when configuring the php environment. This function is used to test whether the php environment is successfully installed. However, this function also brings security risks to the system, then, we often write phpinfo () when configuring the php environment. This function is used to test whether the php environment is successfully installed. However, this function also brings security risks to the system, so how can we turn off this function? The following describes a method:
Modify the php. ini file and find the following lines in it:,
The code is as follows:
Disable_functions =; This directive allows you to disable certain
; Functions for security reasons. It has es
; A comma separated list of function names.
; This directive is * NOT * affected by whether
; Safe Mode is turned on or off.
Write it
Disble_functions = phpinfo
Restart apache to block the phpinfo () function.
Success (); this function is used to test whether the php environment has been installed successfully. However, this function often brings security risks to the system...