Home  >  Article  >  Backend Development  >  How to disable method in php.ini

How to disable method in php.ini

藏色散人
藏色散人Original
2021-12-17 09:40:481964browse

How to disable php.ini: 1. Find and open the php.ini configuration file; 2. Find the "disable_functions" option and use this option to turn off some dangerous functions.

How to disable method in php.ini

The operating environment of this article: Windows 7 system, PHP version 7.1, Dell G3 computer.

php.ini How to disable methods?

Disable PHP functions, you can configure php.ini

There is a disable_functions switch option in php.ini, this option can turn off some dangerous functions , such as system, exec, etc.

For example: disable_functions = phpinfo, if the phpinfo() function is called in the file, then when error_reporting is turned on, the following error will be prompted:

Warning: phpinfo() has been disabled for security reasons

Shielded function example:

disable_functions= phpinfo,dl, exec, system

Recommended learning: "PHP Video Tutorial"

The above is the detailed content of How to disable method in php.ini. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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