Re: Re: DOCUMENT_ROOT on Apache

From: Date: Mon, 09 Dec 2002 19:09:16 +0000
Subject: Re: Re: DOCUMENT_ROOT on Apache
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-17362@lists.php.net to get a copy of this message
echo $_SERVER['HTTP_HOST'] . $_SERVER['PHP_SELF'] You can also use the following for PHP_SELF: $_SERVER['REQUEST_URI'] <- has GET string as well $_SERVER['SCRIPT_NAME'] <- haven't used this one yet You could also use $_SERVER['SERVER_NAME'] instead of HTTP_HOST, but HTTP_HOST is what the user typed in the URL. -Dash Answers to Last Fortune's Questions: (1) None. (Moses didn't have an ark). (2) Your mother, by the pigeonhole principle. (3) I don't know. (4) Who cares? (5) 6 (or maybe 4, or else 3). Mr. Alfred J. Duncan of Podunk, Montana, submitted an interesting solution to Problem 5. (6) There is an interesting solution to this problem on page 1029 of my book, which you can pick up for $23.95 at finer bookstores and bathroom supply outlets (or 99 cents at the table in front of Papyrus Books). On Fri, 6 Dec 2002, Radovan Radic wrote: > Ok, > what should i do ot get > http://localhost/test > I need this do make a link to homepage (i got same app on more servers and i > dont want to hard-code in every page ) > > Radovan > > "Erythros" <erythros@erythros.d2g.com> wrote in message > news:20021206183509.7999.qmail@pb1.pair.com... > > because your asking for the document root, ie: the directory root. > > > > "Radovan Radic" <rasho@ving.co.yu> wrote in message > > news:20021206170947.36448.qmail@pb1.pair.com... > > > Hi > > > > > > I installed Apache 1.3.27 on w2k, after using IIS. > > > When i try to output > > > print "<A HREF=\"$DOCUMENT_ROOT\">Home</A>; > > > it gives me A HREF="c:/inetpub/wwwroot/test/" > > > instead of > > > http://localhost/test > > > Why is that? > > > > > > Radovan > > > > > > > > > > > > > > -- > PHP Windows Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.windows (#17362) next »