The ini_set function in php is provided by php to modify and set php. ini configuration file function, this function is very convenient, you do not need to manually modify php. INI files, sometimes we do not have the permission to modify php. INI file, then this function is used.
Syntax:Ini_set ("option", "value"); it is best to put this function in the header of the php script.
For example: ini_set ("max_execution_time", "180"); // set the php script timeout to 180 seconds.
For specific php options, refer to the Configuration PHP Core section of the phpinfo file.
Ini_get is the opposite of ini_set. It is used to obtain the value of the environment variable in the php. ini file.
Syntax:String ini_get (string varname); return the value of the option. If the option value is Boolean, the return value is 0 or 1.
For example, echo ini_get ('max _ execution_time '); // output 30
If you want to get the variable value in the entire php. ini, you can use the ini_get enhancement function ini_get_all () to return the entire php environment variable in the form of an array.