note 63189 deleted from reserved.variables by felipe
| From: | felipe@php.net | Date: | Sun, 30 Dec 2007 18:25:12 +0000 |
| Subject: | note 63189 deleted from reserved.variables by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134355@lists.php.net to get a copy of this message | ||
Note Submitter: adam3000 at gmail dot com
----
I was trying to find an alternative to $_SERVER['REQUEST_URI'] for a Windows NT set up and
the ones below didn't really work for me so here's my solution using eustf at hotmail dot
com's suggestion of $_SERVER['PHP_SELF']:
// if 'REQUEST_URI' isn't available then ...
if(!isset($_SERVER['REQUEST_URI'])) {
// ... set my own request url and ...
$temp_request_url = $_SERVER['PHP_SELF'];
// ... test for and add url variables to my request url ...
if (isset($HTTP_SERVER_VARS['QUERY_STRING'])) {
$temp_request_url .= (strpos($updateGoTo, '?')) ? "&" : "?";
$temp_request_url .= $HTTP_SERVER_VARS['QUERY_STRING'];
}
} else {
// ... otherwise use the regular 'REQUEST_URI'
$temp_request_url = $_SERVER['REQUEST_URI'];
}