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
ROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, February 09, 2001 10:40 AM
Subject: [PHP] how to know which web dir you're in
> 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
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) an
3 matches
Mail list logo