note 63189 added to reserved.variables
| From: | adam3000 at gmail dot com | Date: | Wed, 15 Mar 2006 18:30:49 +0000 |
| Subject: | note 63189 added to reserved.variables | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-105866@lists.php.net to get a copy of this message | ||
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'];
}
----
Server IP: 64.71.164.2
Probable Submitter: 71.208.187.250
----
X-Spam-Status: No, hits=3.8 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER,
UPPERCASE_25_50 autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/reserved.variables.php
Edit -- http://master.php.net/note/edit/63189
Del: integrated -- http://master.php.net/note/delete/63189/integrated
Del: useless -- http://master.php.net/note/delete/63189/useless
Del: bad code -- http://master.php.net/note/delete/63189/bad+code
Del: spam -- http://master.php.net/note/delete/63189/spam
Del: non-english -- http://master.php.net/note/delete/63189/non-english
Del: in docs -- http://master.php.net/note/delete/63189/in+docs
Del: other reasons-- http://master.php.net/note/delete/63189
Reject -- http://master.php.net/note/reject/63189
Search -- http://master.php.net/manage/user-notes.php