tags:

views:

38

answers:

1

for example:

/home/mydomain.co.uk/public_html/

Something generic for windows or linux? Id like it to produce the root path only regardless of where i call the script from. So not the absolute root path to my script.

Sorry is this is hard to understand.

+1  A: 

$_SERVER['DOCUMENT_ROOT']; will work on both

adam
This is great thanks, is there a way of using a wild card for a directory? Because one of the folders i am using cant be determined.So the path would be document_root/wild card/the rest of my path?
Andy
Umm no. You'd have to write a script to search through possible paths. You could get a list of paths and then use regex to match all with wildcards
adam
Thanks for coming back to me.
Andy