note 39439 deleted from function.header by victor
| From: | victor@php.net | Date: | Sat, 19 Jun 2004 15:40:48 +0000 |
| Subject: | note 39439 deleted from function.header by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-71363@lists.php.net to get a copy of this message | ||
Note Submitter: jamespilcher1-hotmail
----
PHP seems to automatically change the Content-Type header of any document it processes to text/html.
If the document is something else, ie CSS you should set the header back to the correct value.
For example, if PHP is interpreting .css files in your website, you should add <?php
header("Content-type: text/css");?>
at the top of the css file, otherwise PHP outputs it's type as text/html.
this doesnt usually cause problems, but if your main document is XHTML and someone views it in
Mozilla, it won't load the stylesheet unless its content type is text/css.