Re: how to know which web dir you're in
| From: | Matt | Date: | Fri, 09 Feb 2001 15:54:03 +0000 |
| Subject: | Re: how to know which web dir you're in | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-38963@lists.php.net to get a copy of this message | ||
Your best bet would probably be to use the environment variables
getenv("REQUEST_URI") will get you the URL minus the host name, so basically it's the relative path.
getenv("HTTP_HOST") will return the hostname (www.whatever.com)
Hope this helps.
Regards,
Matt
At 09:40 AM 2/9/2001, you wrote:
Anyone got any ideas on how to tell what the url you're at? One of my sites
is for a bank with a bunch of branches, and when people go to a site for a
branch, I want the "prequalify for loan" to know where the person came from
(it's the same page for all branches, but it just has a select box) and make
the location they came from be the selected one when the prequal page comes
up. Whaddya think?
Thanks.
Jason
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
For additional commands, e-mail: php-general-help@lists.php.net
To contact the list administrators, e-mail: php-list-admin@lists.php.net