Code: Select all
<?php
if (!$home_url)
{
$host = getenv("HTTP_HOST");
if ($host == "localhost")
{$home_url = "http://$host/mysitelocal/";}
else
{$home_url = $host;}
session_register(home_url);
}
?>See how I call my css these days.
Code: Select all
<link rel='stylesheet' type='text/css' href='<? print "$home_url"; ?>css/styles.css'>I also use it for images and stuff.