tags:

views:

50

answers:

2

http://www.easysavannah.com/myspace1/template/default/css.css I use this program now to beta a Myspace type site >

+1  A: 

Make your server parse CSS files as PHP and then add this at the top of your CSS files:

<?php Header ("Content-type: text/css");?>

I believe the .htaccess line to make CSS files run through PHP is:

AddType application/x-httpd-php .css
Brendan Long
A: 

Warning! Opera will try to cache php files with css content types. It is recommended that in addition to declaring a text/css content type, you include the entire following code at the beginning of your CSS file:

<?php

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

    //http://www.thinkvitamin.com/features/webapps/serving-javascript-fast
    //required so Opera does not cache this file
    # 'Expires' in the past
    header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
    # Always modified
    header("Last-Modified: ".gmdate("D, d M Y H:i:s")." GMT");
    # HTTP/1.1
    header("Cache-Control: no-store, no-cache, must-revalidate");
    header("Cache-Control: post-check=0, pre-check=0", false);
    # HTTP/1.0
    header("Pragma: no-cache");

?>

To remind myself that these are css files, I maintain the following naming convention:

file-name.css.php

kingjeffrey