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).

All source code and related services that I release are "dontation-ware". If you use the above please make a dontation (pay whatever you think the it is worth) or (where applicable) leave the link to my site attached.

Labels:

0 Comments:

Post a Comment

Links to this post:

Create a Link

<< Home
Counter