I wanna know where is the best place to put the ini_set() functions, because I think when the ini_set
function is inside the method like this:
private function archiveBackup() {
ini_set('memory_limit', '128M');
ini_set('max_execution_time', 0);
...
}
The ini_set
function doesn't work?!
My script works like that: jQuery ajax query -> ajax.php file (make instance of the class and call some method) -> call the method of the class.
Where is the best place? In ajax.php
file or at the start of class or inside methods?
In general, the best place to put ini_set
calls is right at (or near) the start of the script. That way, it's pretty much the same as if they had been defined in the php.ini
file in the first place.