^ above post isn't really correct...
You can't use php for errorpages properly, because that's part of the server config. But apache has given us .htaccess files which can change every errordocument for each directory.
(If you put a htaccess in a certain directory, this affects this directory...