faqts : Computers : Programming : Languages : PHP : Common Problems : HTTP Headers

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

16 of 51 people (31%) answered Yes
Recently 6 of 10 people (60%) answered Yes

Entry

How can I change the HTTP header that is sent back to the client?
Can I send a HTTP header code other than 200 from PHP?

Jul 2nd, 1999 06:07
Nathan Wallace, unknown unknown, Mattias Nilsson


Just use the header() function.

    http://www.php.net/manual/function.header.php3

Make sure that you call header() before any data (even whitespace) has
been sent back to the client.