Hi I have a site structure, not using a cms, in which i'd like to link to my root index, from within different directories. Now is there a script like <? root ?> that i can paste before every link thus re-using that link wherever in the site? something like <a href="<? root ?>/services"> for EVERY directory no mather how deep in the site structure instead of using ../services or ../../../services,... Hope it's clear enough!
Any reason you can't use an absolute path as in <a href="/services"> ? That will point to yourdomain.com/services no matter where it's called from.
I would prefer to put all my links in one file called links.php, and include them. But those links won't work when there accessed in a subdirectory far away will they?
<a href="/services"> will work anywhere as it's an absolute path and doesn't care what directory it's in, it will always point to "domain.com/services"