I'm trying to get the right path and so far I have this which kind of works, but not if the file is in a sub directory.
These links I have in my navigation:
<ul> <li><a href="<?php echo $_SERVER['DOCUMENT_URI'].'about/organisation.php'; ?>">Organisation</a></li> <li><a href="<?php echo $_SERVER['DOCUMENT_URI'].'about/team.php'; ?>">Team</a></li> </ul>
This works from my index.php , but not from organisation.php and team.php in the 'about' directory. If I want to open 'team.php from within organisation.php, I get an URL in the address bar like this:
As you can see I get 'about' twice, so what is the right way to tackle this issue?
Worth to mention that I use a PHP include to add the navigation on every page, so I can't change the links, becaue I could solve it by excluding
about/ if I didn't use a PHP include for the navigation.
<a href="<?php echo $_SERVER['DOCUMENT_URI'].'team.php'; ?>">Team</a>