If I remember correctly, it'd be

header("Content-Type: text/css");

HTH
Martin

-----Original Message-----
From: Justin French [mailto:[EMAIL PROTECTED]
Sent: Thursday, 24 July 2003 12:42 PM
To: php
Subject: [PHP] do i need to output headers on parsed CSS files?


Hi all,

I'm forcing my style sheets (.css) though the PHP parser, so that they 
can take advantage of some color variables and global config settings 
via include files, eg:

body {
        background-color: #<?=$col['1']?>;
        }

however, I've noticed that when viewing the CSS file in a browser now, 
it looks more like a HTML document int he browser (variable width 
fonts, no newlines, etc) rather than other css files (wich look like 
they have <pre> tags aroun them (newlines visible, fixed-width font, 
etc).

So, my assumption is that pushing the .css file through PHP is putting 
the wrong header on the file (text/html) rather than text/css -- or 
perhaps something else -- my header knowledge is poor.

Anyway, the pages and linked CSS files *work* but do not validate any 
more, witha  warning "You can't import an HTML document".


What/how should I force the correct headers on these PHP-parsed CSS 
files?


TIA
Justin French


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
__________ Information from NOD32 1.466 (20030722) __________

This message was checked by NOD32 for Exchange e-mail monitor.
http://www.nod32.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to