Hi all,
I have forgotten how tell a script include from rootdirector/whatever for a script in any directory. Before that I was using ../whatever but this breaks when I am in the root directory.
Can anyone remind me how to do this.
Are you looking for $_SERVER['DOCUMENT_ROOT'] ??
That seems to have fixed it - Thanks
Ah sorry, it worked for the inclusion of files - but not when using it for links. Obviously as it gives the full file root. Any other ideas?
An equivalent for URL's might be
"http://".$_SERVER['SERVER_NAME']."/";
Thanks for all your help. I have realised that I need 2 kinds of path for my application, one for the url and one for the document. This was a problem I did not expect.