Content-type not working in PHP

Posted by Industrial on Stack Overflow See other posts from Stack Overflow or by Industrial
Published on 2010-03-24T14:59:49Z Indexed on 2010/03/24 15:13 UTC
Read the original article Hit count: 294

Filed under:
|
|
|

Hi everyone,

I have some issues with a PHP file that is not working properly. The Content-type does not get recieved by any browser at all. Firebug interprets the file as text/html instead of css. Here's the file :

<?php
header('Content-Type: text/css; charset=UTF-8');
error_reporting(E_ALL | E_STRICT);
ini_set('display_errors', 'On');
/* CSS goes on from here */

I tested to put a row with echo 'TEST'; before the header line, and was expecting to see the classic "headers already sent" error, but nothing appears!

What can I do to sort this out?

© Stack Overflow or respective owner

Related posts about php

Related posts about content-type