When configuring the PHP environment, we remember that the first step is to modify the php.ini file, but when we run the script in a virtual machine, or we do not have permission to modify php.ini due to other reasons, we what to do?
The ini_set() function provides a method to dynamically modify php.ini in a script, and the modification becomes invalid after the script is executed, so it is often used in program configuration.
The ini_set function receives two parameters, one is the original configuration item name, and the second is the new value of the configuration item to be set. The cooperation between ini_set and ini_get is very suitable. The example is as follows:
Not all configuration items can be set with ini_set. For details, see the appendix
For more details, please refer to: php.net