crazy-mike
09-22-2015, 08:53 AM
На первый взгляд ведь идиотизм...Но если чуть углубиться во всю глубину наших глубин....
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Test</title>
<link rel="stylesheet" type="text/css" href="./mycss.php" />
</head>
<body>
<h1>Hello!</h1>
</body>
</html>
ну и теперь mycss.php:
<?php
header("Content-type: text/css");
define("RED","MidnightBlue");
?>
body {
background-color :<?=RED;?>; color :White; font-weight :bold;
text-align :center; padding :50px;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Test</title>
<link rel="stylesheet" type="text/css" href="./mycss.php" />
</head>
<body>
<h1>Hello!</h1>
</body>
</html>
ну и теперь mycss.php:
<?php
header("Content-type: text/css");
define("RED","MidnightBlue");
?>
body {
background-color :<?=RED;?>; color :White; font-weight :bold;
text-align :center; padding :50px;
}