note 92206 added to reserved.variables.server

From: Date: Tue, 14 Jul 2009 14:34:03 +0000
Subject: note 92206 added to reserved.variables.server
Groups: php.notes 
Request: Send a blank email to php-notes+get-158274@lists.php.net to get a copy of this message
In reply to Richard York, the reason the additional variables are not documented here is that they are not being set by PHP, but are inherited from the "environment" in which it is run. In the command-line case, this is the shell that ran the PHP command, and current environment variables can usually be listed by running "set". Many will be set by the shell itself, which will document their purpose (see documentation for your shell, e.g. "man bash"). In a web environment, there may also be additional environment variables set by the web server. This can be used to pass information from an Apache configuration file into the PHP script, e.g.: # in apache config file SetEnv site_mode Live # in PHP file <?php if ( $_SERVER['site_mode'] == 'Live' ) { ... } ?> ---- Server IP: 92.48.74.199 Probable Submitter: 93.97.191.163 ---- Manual Page -- http://www.php.net/manual/en/reserved.variables.server.php Edit -- https://master.php.net/note/edit/92206 Del: integrated -- https://master.php.net/note/delete/92206/integrated Del: useless -- https://master.php.net/note/delete/92206/useless Del: bad code -- https://master.php.net/note/delete/92206/bad+code Del: spam -- https://master.php.net/note/delete/92206/spam Del: non-english -- https://master.php.net/note/delete/92206/non-english Del: in docs -- https://master.php.net/note/delete/92206/in+docs Del: other reasons-- https://master.php.net/note/delete/92206 Reject -- https://master.php.net/note/reject/92206 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#158274) next »