you could make your links absolute
ie..

/cat.html

so if you're in http://green/admin/admin.html

you would link to

http://green/cats.html

HTH

M@
> I am developing a PHP site under windows which is going to be deployed
> eventually on Unix (indeed when life gets less hectic will also
> be developed
> under Unix but that's another story).
>
> Anyway the header.html (included at top of every page) has links in it.
> However depending where the page is which is including
> header.html the links
> (from a relative point of view) will be different.  For example for the
> index.php (which is in site root) the catalogue page is simply referred to
> as cat.html but from admin.html (which is in the admin directory
> under site
> root) ../cat.html would be required.
>
> A way to get round this problem seems to be to have a variable
> with the site
> root in it (i.e. $siteroot = "c:/pages/") however this is causing
> me a real
> headache.  using
>
>   echo "<a href=\"" . $siteroot "/cat.php">Catalogue</a>
>
> renders href to c:/pages/cat.php but then the browser tries to
> download the
> page as a file.  I have also tried
>
> $siteroot = "http://green/
>
> (green being the domain) but this douse not work either.
>
> I would really like the solution to this to be platform independent.
>
> Ta in Advance,
> ben
> --
> [EMAIL PROTECTED] (ben@work until end March)
> [EMAIL PROTECTED] (ben@home)
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to