note 77962 added to reserved.variables

From: Date: Fri, 21 Sep 2007 15:45:05 +0000
Subject: note 77962 added to reserved.variables
Groups: php.notes 
Request: Send a blank email to php-notes+get-130670@lists.php.net to get a copy of this message
The headers sent by the browser will be stored in the $_SERVER array -- they will get capitalized and prefixed with HTTP. So a header like "X-Foo-Bar: Baz" will result in <?php $_SERVER['HTTP_X_FOO_BAR'] = 'Baz';?>. This is why you should use isset before using e.g. HTTP_ACCEPT_LANGUAGE, 'cause it may not be set. The only exception I know from that is HTTP_X_ORIGINAL_URI, which is always set and holds the current URL without querystring. But you can't trust that too because it can be overriden by sending a X-Original-URI header. ---- Server IP: 217.13.201.10 Probable Submitter: 85.181.179.192 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.php Edit -- https://master.php.net/note/edit/77962 Del: integrated -- https://master.php.net/note/delete/77962/integrated Del: useless -- https://master.php.net/note/delete/77962/useless Del: bad code -- https://master.php.net/note/delete/77962/bad+code Del: spam -- https://master.php.net/note/delete/77962/spam Del: non-english -- https://master.php.net/note/delete/77962/non-english Del: in docs -- https://master.php.net/note/delete/77962/in+docs Del: other reasons-- https://master.php.net/note/delete/77962 Reject -- https://master.php.net/note/reject/77962 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#130670) next »