I actually use both... in a way. I'll define a variable for the root in a a configuration file.
PHP Code:
<?php
$doc_root = "http://localhost/website1";
?>
Then when I need to make links, I do so like:
PHP Code:
<a href="<?php echo $doc_root;?>/blah.htm">blah</a>
That way, I can make it work on my local development server, and then when I upload it, all I have to do is change that variable. This also works wonders should you ever need to change a domain name, use it as a template, blah blah bloggity blah...
Bookmarks