faqts : Computers : Programming : Languages : PHP : Database Backed Sites : MySQL : Questions in search of an Answer

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

4 of 4 people (100%) answered Yes
Recently 1 of 1 people (100%) answered Yes


Why does PHP4 prepend "Content-type:<what I have set in php.ini>" to the begining of each page that it parses? Win98+PHP4+Apache

Nov 14th, 2001 17:02
Al Ac, John Milton, Onno Benschop,

Apache is a web server, it serves HTML by default, HTML documents (as 
sent by the webserver) contain some info that the browser reads but 
does not show, for example the HTTP headers. The content-type is meant 
to be read by the browser. Since your are reading the raw ouput of the 
webserver you will find stuff like that. That's just the way things 
work. Apache does have a "send as is" mode that i think wouldn't 
include other headers, (NOT SURE!!) maybe you could try that.