4WebHelp
 FAQ  •  Search  •  User Groups  •  Forum Admins  •  Smilies List  •  Statistics  •  Rules   •  Login   •  Register
Toggle Navigation Menu

 PHP: Document root IIS
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic
Author Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Mon Jan 20, 2003 4:24 pm (21 years, 3 months ago) Reply with QuoteBack to Top

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 Rolling Eyes )

i.e on Apache it would look like this:
/hsphere/local/home/darren/fancy-rats.co.uk

on IIS it would look like this:
????
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Daniel
Team Member



Joined: 06 Jan 2002
Posts: 2564

PostPosted: Mon Jan 20, 2003 4:35 pm (21 years, 3 months ago) Reply with QuoteBack to Top

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.

________________________________
Image

Last edited by Daniel on Mon Jan 20, 2003 4:57 pm, edited 1 time in total
OfflineView User's ProfileFind all posts by DanielSend Personal Message
Darren
Team Member



Joined: 05 Feb 2002
Posts: 549
Location: London

PostPosted: Mon Jan 20, 2003 4:48 pm (21 years, 3 months ago) Reply with QuoteBack to Top

Sorted Very Happy
thanks for that...

p.s. these didn't work:
  • $HTTP_SERVER_VARS['DOCUMENT_ROOT']
  • $HTTP_ENV_VARS['DOCUMENT_ROOT']
OfflineView User's ProfileFind all posts by DarrenSend Personal MessageVisit Poster's Website
Display posts from previous:      
Post New TopicReply to Topic
View Previous Topic Print this topic View Next Topic


 Jump to:   




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.121454 seconds :: 18 queries executed :: All Times are GMT
Powered by phpBB 2.0 © 2001, 2002 phpBB Group :: Based on an FI Theme