Re: Error headers with php.
^ 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 and each of its subdirectories.)
The syntax is: ErrorDocument {errorcode} {document}
An example is: ErrorDocument 404 404.shtml
(The order deny, allow isn't part of errordocuments)
What happens if you send the 404 header along with a page is:
the browser gets the headers, one being the status code (404) and then receives the contents. The browser might stop when he receives the 404 and show the error, but most browsers show the transmitted file (they assume this is your errordocument)
Real programmers don't document their code - if it was hard to write, it should be hard to understand.