Configuration items in PHP if the php.ini is a static configuration item that is read only once when the server starts, the runtime modification does not work, and a restart is required after the general modification.
The summary says that due to some limitations, we cannot complete the dynamic configuration, so we need dynamic configuration, note that this way will not change php.ini, rest assured to try it
String Ini_set (String $varname, String $newvalue) string Ini_get (string $varname) array Ini_get_all ([string $extens ion [, BOOL $details = true]])//Read all configuration entries void Ini_restore (string $varname)//Reply all configuration items bool Extension_loaded (string $na ME) bool DL (string $library)
such as the following settings
<?phpecho ini_get (' display_errors '); setting is not allowed to display errors,//In the released product is forbidden to set to true, one side caused security risks, this is similar to "Real machine" debugging, so open if (!ini_get (' display_errors ')) {Ini_set (' Display_ Errors ', ' 1 ');} echo ini_get (' display_errors ');? >
Again like
<?phpif (!extension_loaded (' GD ')) {if (!dl (' gd.so ')) {exit; }}?>
PHP dynamic Configuration Runtime Environment parameter ini_xxx,extension_loaded