Many functions in our PHP are not used a lot of the time, and they pose great security problems to the website. Below we use the disable_functions switch option in PHP.ini to turn off some functions that are not needed.
If it is disabled, the following prompt will appear
Warning: phpinfo() has been disabled for security reasons
Shielding function example:
代码如下 | 复制代码 |
disable_functions= phpinfo,dl, exec, system |
Note: Some friends want to use disable_functions to disable the eval function. This cannot be disabled. As for the reason, I tell you that it is not a system function. You can check it for details.