ini_set() changes a configuration directive for the current script when that directive is changeable at runtime. The setting normally returns to its configured value after the request ends.
<?php
$old = ini_set('memory_limit', '256M');
echo ini_get('memory_limit');
echo ini_get('memory_limit'); // OUTPUT 60
ini_set('memory_limit','256M');
echo "<br>";
echo ini_get('memory_limit'); // output 100
We can change some of the configuration options by using ini_set() during the script execution. We can’t change permanently the setting by using ini_set(). Values will return to original value once the script execution is over.
Author & Instructor at plus2net
I write and maintain practical tutorials on Python, PHP, SQL, JavaScript, HTML, jQuery, and web development at plus2net. The tutorials focus on clear explanations, working examples, and code that readers can test and adapt while learning.
| infinity | 08-04-2011 |
| this is not done plz give us brief discription of ini_set functions limit | |