Jump to content

REQUEST_URI


esepich

Recommended Posts

the link you posted seems incomplete..... but try requesting 'PATH_INFO' or 'ORIG_PATH_INFO' . see if that puts out anything....

Edited by Rollins
Link to comment
Share on other sites

There's no URI there, you're not requesting a specific file. If you run that URL through parse_url: http://php.net/manual/en/function.parse-url.php you'll see that it will set the scheme to "http", the host to "qtmtrk.com", the path (URI) will be blank because you're not requesting a specific file, and the querystring will be "a=23&c=455&s1=111&s2=222&s3=333&s4=444&s5=555".

Link to comment
Share on other sites

oke...not to hijack this post but.... a URL leads to "just" a location....? a URI leads to a specific location or resource, and can contain some info in the form of location.php?info=random? (and then there is URN wich is name only...?)

Link to comment
Share on other sites

Technically, a URI can be either a URL, or a URN, or both. PHP's REQUEST_URI value does not contain the entire URI, which would include the scheme, host, etc. It only contains the name of the file that was requested, including the querystring. To build the entire URI you would use part of what is in SERVER_PROTOCOL, plus HTTP_HOST, plus REQUEST_URI. You can get the running script from $_SERVER['SCRIPT_NAME'], $_SERVER['SCRIPT_FILENAME'], or the __FILE__ constant (they don't necessarily have the same values). Normally, people talking use the terms URL and URI interchangeably.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...