In your web based system written in PHP, some pages may display many data or provide upload functions. It may display a blank page after loading for a long time. Then you can use the following codes to display the error:

ini_set('display_errors', TRUE);

Sometimes the page displays a blank page because the memory limit is reached. And the error like below would be got:

Fatal error: Allowed memory size of 134217728 bytes exhausted

This error means that 128 MB memory limit is exceeded when loading. To solve this error, you can update the setting in php.ini or increase the memory_limit by using PHP code as below:


The code above is to set the memory limit as 256 MB. You can use "-1" to set the memory limit as unlimited. But the pages may keep loading for a very long time.