参考:
1. http://www.phpro.org/articles/Embedding-PHP-In-CSS.html
2. http://www.barelyfitz.com/projects/csscolor/
test.php
<link rel="stylesheet" type="text/css" media="screen" href="test2.php">
I don't even see the code. All I see is blonde... brunette... redhead...
test2.php
<?php
header("Content-type: text/css");
$white = 'red';
$dkgray = '#333';
$dkgreen = '#008400';
?>
body {
background:<?=$white?>;
color:<?=$dkgray?>;
}
h1, h2, h3, h4 {
color:<?=$dkgreen?>;
}
blockquote {
color:<?=$dkgreen?>;
}