The Ini_set function is the value in the SET option, which takes effect after the function is executed, and this setting is invalidated when the script ends. Not all options can be changed by the function set. The specific values can be set and the list in the manual can be viewed.is the ability to set the option values in the php.ini for example, the Display_error option is off, but you want to display the error message in the program, so that you can debug the program, then use the PHP ini_set function:
- Ini_set ("Display_errors
Then the program on your page will display an error message, and you can also use error_reporting to set the level of error messages displayed.
If you need to increase the script execution time, you can set:
- Ini_set ("Max_execution
Then the script execution time is changed from the default of 30 seconds to 180 seconds, of course, you can also use Set_time_limit () to set.
In fact, you put PHP ini_set function and ini_get combination so that, very good. For example, if you want to add your own file path to the config file, but you have no permission to change php.ini, you can combine two functions:
- Ini_set (' include_path '
, Ini_get (' include_path ').
':/your_include_dir: ');
http://www.bkjia.com/PHPjc/446224.html www.bkjia.com true http://www.bkjia.com/PHPjc/446224.html techarticle In PHP configuration functions, one function is to implement certain variable values in the Set php.ini. It is the PHP ini_set function that we are going to introduce to you today. The Ini_set function is set ...