|
Author |
Message |
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Mon Jan 20, 2003 4:24 pm (21 years, 3 months ago) |
|
Anyone know what the equivalent of $DOCUMENT_ROOT on Apache would be using IIS?
I know there isn't an equivalent variable, but if I want to set it manually what am I looking for? (not explaining very well )
i.e on Apache it would look like this:
/hsphere/local/home/darren/fancy-rats.co.uk
on IIS it would look like this:
???? |
|
|
|
|
Daniel
Team Member
Joined: 06 Jan 2002
Posts: 2564
|
Posted:
Mon Jan 20, 2003 4:35 pm (21 years, 3 months ago) |
|
Your host will tell you the path to your document root.
If you want to set it manually, use some code like this:
Code: | $DOCUMENT_ROOT='d:\inetpub\wwwroot\domain.com'; | or
Code: | $HTTP_SERVER_VARS['DOCUMENT_ROOT']='d:\inetpub\wwwroot\domain.com'; | or
Code: | $_SERVER['DOCUMENT_ROOT']='d:\inetpub\wwwroot\domain.com'; |
I'm still not sure if there is no equivalent to $DOCUMENT_ROOT, so you may want to try out the following variables, just to see if they work:
- $HTTP_SERVER_VARS['DOCUMENT_ROOT']
- $HTTP_ENV_VARS['DOCUMENT_ROOT']
One last idea: try running a phpinfo(), then looking for what seems to be the document root, and then looking at the variable's name. |
________________________________
Last edited by Daniel on Mon Jan 20, 2003 4:57 pm, edited 1 time in total |
|
|
|
Darren
Team Member
Joined: 05 Feb 2002
Posts: 549
Location: London
|
Posted:
Mon Jan 20, 2003 4:48 pm (21 years, 3 months ago) |
|
Sorted
thanks for that...
p.s. these didn't work:
- $HTTP_SERVER_VARS['DOCUMENT_ROOT']
- $HTTP_ENV_VARS['DOCUMENT_ROOT']
|
|
|
|
|
|
|
You cannot post new topics in this forum. You cannot reply to topics in this forum. You cannot edit your posts in this forum. You cannot delete your posts in this forum. You cannot vote in polls in this forum.
|
Page generation time: 0.122484 seconds :: 19 queries executed :: All Times are GMT
Powered by phpBB 2.0
© 2001, 2002 phpBB Group :: Based on an FI Theme
| |