Where magic lives

Tuesday, December 12, 2006

PHP Error Handling for Dynamic Images

A long time ago I wrote a script to handle PHP errors in a useful way. I still use it when writing in PHP today but it is not much use if you are writing a script that is producing images so I recently wrote a version that outputs to an image. Here is a sample error and here is the source code. As long as you insist on writing totally error free code (i.e. no E_NOTICE's) it can be included directly into any page that generates images. Remember to remove it before going into production though (it spits out source code and variable dumps when there is an error).



Post a Comment

Subscribe to Post Comments [Atom]

<< Home