When we use ini_set like below in code, will memory limit be the same for all other codes? or only valid for in which code we added ?
ini_set('memory_limit', '512M');
Thanks
When we use ini_set like below in code, will memory limit be the same for all other codes? or only valid for in which code we added ?
ini_set('memory_limit', '512M');
Thanks
It is only working for the file where it is written. Best way to change settings for multiple phps in the same folder are:
php_value memory_limit '512M'
Keep in mind, this only works, if you server configuration allowes "AllowOverride" directive for this directory
You can do this in php.ini.
but this will take affect to ALL php-files you are running
php.net/manual/de/
to php.net/manual/en/
–
Compendious It depends where you are adding.
If in a specific script
then till that script is running. If setting at application level
then it will be set for that specific application.
© 2022 - 2024 — McMap. All rights reserved.