How to increase memory limit with PHP
On rare occasion, I need to up the memory allowed for PHP.
This situation hit me when I was generating a large CSV file which was then forced to download.
There's an easy way to increase the amount of memory you want to allocate PHP which is something as below:
The above code will increase the maximum amount of memory available to PHP to 256MB.
The setting is only adjusted for the running script.