How to block the phpinfo of function in php
- 2020-06-07 04:05:17
- OfStack
When we configure php, we tend to write phpinfo (); This function is used to test whether the php environment has been installed successfully. However, this function is often a security hazard for the system. So how to turn off this function? Here is a method:
Modify the php.ini file to find the following line,
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.
The written
disble_functions = phpinfo
Restart apache to block phpinfo (); The function.