OK, I've searched for this on the boards... how to construct the URL of the current page being called.
Best suggestion I've found so far has been:
$url = "http://$HTTP_HOST$PHP_SELF?$QUERY_STRING";
Which works in 99% of the cases, I guess... EXCEPT, in my little hell.
If the url in the browser is:
http://localhost/?a=home
the $url formula above results in:
http://localhost/index.php?a=home
i.e., it includes the script name, even though the script name isn't really in the URL.
Is this just a symptom of the way the web server translates URL requests based on 'default' page settings? Is it beyond PHP's control? Running this on Win2k/IIS 5, btw.
Thanks,
sd