RE: [PHP] absolute vs relative path?
| From: | Jim Moseby | Date: | Wed, 25 Jan 2006 13:23:09 +0000 |
| Subject: | RE: [PHP] absolute vs relative path? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-229229@lists.php.net to get a copy of this message | ||
> Hello,
>
> I Have a web site on one server and a test site on another.
> How can I build
> the hyperlinks so that they work on both servers without modification.
>
> For example build this link dynamically:
> "http://www.domain.com/www/test.php
>
> In test server the same should be:
> "http://internalserver/www/test.php
>
Well, for hyperlinks to local pages, you can leave off the domain part all
together. So in the above example you would just use "/www/test.php". Any
hyperlinks to remote servers would be the same in test as they are in
production.
JM