Re: Capture the whole URL
| From: | Jim Lucas | Date: | Fri, 23 Feb 2007 06:18:57 +0000 |
| Subject: | Re: Capture the whole URL | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-249272@lists.php.net to get a copy of this message | ||
Ken Kixmoeller -- reply to ken@kixmoeller.com wrote:
Hey - - I must be missing something, but in a URL such as: diddly.com?id=fred&total=goof First of forgoing the http:// missing, this still isn't a qualified URLyou are missing the / after the .com. echo $_SERVER['REQUEST_URI']; and see what it returns if for some odd reason that doesn't work try echo $_SERVER['QUERY_STRING']; and if you are possibly making a typo, try var_dump($_SERVER);
$_SERVER['PHP-SELF'] gives me the diddley.com part. this should be $_SERVER['PHP_SELF'] underscore, not a hyphen
I want to capture the whole URL. The documentation makes it seem like $_SERVER['REQUEST_URI'] is supposed to do that, but I get an "Undefined Index" error.show us an example of the script that generates the error source and output of given source please
Do I have to enable this somehow? I realize that I could recreate the rest of the URL from $_GET's, but I'd rather not if I don't have to. I have never heard of this not being disabled.Looks like you either typed this pretty fast or maybe you had a few typo's. Review your code and check that you are using underscores and not hyphens. Jim
PHP 5.1 Ken --PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php