Include: CSS with .php file extension?

gnarf nailed it.

I do:

<link rel="stylesheet" type="text/css" media="screen" href="https://stackoverflow.com/questions/1445424/<? echo TMPL ?>css/name-of-file.css.php">

and then in top of your .css.php file:

<?
header('Content-Type: text/css');
// print out your php-driven css...
?>

Leave a Comment