Dynamic CSS Stylesheets with PHP Home
Dynamic CSS Stylesheets with PHP
14/03/2006 posted by Kevin S
<html>
<head>
<?php
$host = $_SERVER['HTTP_HOST'];
if( $host == "first.yourdomain.com" )
{
print("<link href='stylesheet1.css' rel='stylesheet' type='text/css' />");
}
else if( $host == "second.yourdomain.com" )
{
print("<link href='stylesheet2.css' rel='stylesheet' type='text/css' />");
}
else
{
print("<link href='stylesheet.css' rel='stylesheet' type='text/css' />");
}
?>
</head>
<body>
Your Content goes here.
</body>
</html>
|