|   | php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
| 
 PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits              [2002-03-13 18:27 UTC] daniel@php.net
  [2002-03-13 18:47 UTC] rlm at pricegrabber dot com
  [2002-03-13 18:56 UTC] rlm at pricegrabber dot com
  [2002-03-14 02:08 UTC] daniel@php.net
  [2002-03-14 02:10 UTC] daniel@php.net
  [2002-03-14 02:41 UTC] rlm at pricegrabber dot com
  [2002-03-14 05:17 UTC] daniel@php.net
  [2002-08-14 19:16 UTC] iliaa@php.net
 | |||||||||||||||||||||||||||
|  Copyright © 2001-2025 The PHP Group All rights reserved. | Last updated: Fri Oct 31 19:00:02 2025 UTC | 
It is possible to overwrite some predefined variables using GET URI variables (also, I would imagine, POST vars, but it's harder to test for those). Consider the following as foo.php: <? $varlist = array('DOCUMENT_ROOT', 'GATEWAY_INTERFACE', 'HTTP_ACCEPT', 'HTTP_ACCEPT_CHARSET', 'HTTP_ACCEPT_ENCODING', 'HTTP_ACCEPT_LANGUAGE', 'HTTP_CONNECTION', 'HTTP_COOKIE_VARS', 'HTTP_ENV_VARS', 'HTTP_GET_VARS', 'HTTP_HOST', 'HTTP_POST_FILES', 'HTTP_POST_VARS', 'HTTP_REFERER', 'HTTP_SERVER_VARS', 'HTTP_USER_AGENT', 'PATH_TRANSLATED', 'PHP_SELF', 'QUERY_STRING', 'REMOTE_ADDR', 'REMOTE_PORT', 'REQUEST_METHOD', 'REQUEST_URI', 'SCRIPT_FILENAME', 'SERVER_ADMIN', 'SERVER_NAME', 'SERVER_PORT', 'SERVER_PROTOCOL', 'SERVER_SIGNATURE', 'SERVER_SOFTWARE'); foreach ($varlist as $i) print "$i = '".${$i}."'<br>\n"; ?> ============= If I now invoke http://www.foo.com/foo.php?HTTP_ACCEPT_CHARSET=blarg or http://www.foo.com/foo.php?HTTP_REFERER=blarg, I get "blarg" for either of those variables, rather than the value that should have been there from Apache and/or PHP.