note 63189 deleted from reserved.variables by felipe

[email protected]
Newsgroups php.notes
Message-ID <[email protected]>
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'];
}
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.