Hi all,
im sure sombody might have come across this topic before but i dont know what to look for to get the right answer,
i have spent days googling it and some of the examples just dont seem to help, so i wonder if anybody on here might be able to help me… please
its probably quite simple to every body else lol!
i am a noobie and having a go with php and building a site …
I have several directories with php scripts within on various directory levels, this so i can use htacces to block direcy listing etc.
i am using a linux server
My problem that i am having is that i want to be set links and include starting from the a base url each time that way i dont have worry about “…/” etc becase when i do the include seem to have a mind of their own
i have tried …
$base = $_SERVER[“DOCUMENT_ROOT”]
$_SESSION[‘base’] = $base . “info/”
and doing things link … <? include $_SESSION['base'] . "info.php"; ?>
but being on a shared hosting account i just end up getting eg “shared/account/html” followed by the $_SERVER[‘document_root’] again
i jus cant seem to find a way to set $_SESSION[‘base’] to always start me off from the same point and then add where i want it to go so no matter where i am in the scripting i can always be assured that it start from the base etc.
does anybody know what i mean and what i can find out to get my answer
many thanks in advance