What is the use of ini_set() ?
What is the use of ini_set() ?
The ini_set()
function in PHP is used to set the value of a PHP configuration option at runtime. It allows you to modify the behavior of PHP by changing the values of its built-in configuration directives, also known as php.ini
settings.
Here are some common use cases for ini_set()
:
You can use ini_set()
to change the level of error reporting in your script. For example, to display all errors and warnings:
ini_set('display_errors', 1);
ini_set('error_reporting', E_ALL);
If your server doesn't have the default time zone set, you can use ini_set()
to set it for your script:
ini_set('date.timezone', 'America/New_York');
If your script requires more memory than the default limit, you can increase it using ini_set()
:
in...
entry
Gợi ý câu hỏi phỏng vấn
Chưa có bình luận nào