I am trying to figure out how to refresh page when a fatal error occurs. Basically I am accessing an image api and copying images to my server. I am also creating a thumbnail version of the photo each time. I will receive an error message every once in a while stating that my script has tried to allocate too much memory. Which I have spent countless hours trying to resolve, with some help from the nice people on this website. It would be perfect I could just reload the page automatically when that error occurs. Thanks!
Share
I’m not sure that an out of memory will let you do anything (never tried) but you can define your own error handler perhaps http://php.net/manual/en/function.set-error-handler.php
Edit: