note 105584 deleted from reserved.variables.server by danbrown
| From: | danbrown@php.net | Date: | Tue, 30 Aug 2011 17:17:36 +0000 |
| Subject: | note 105584 deleted from reserved.variables.server by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-182832@lists.php.net to get a copy of this message | ||
Note Submitter: hak74 at the place called hotmail
----
you can print all the variables in $_SERVER using the following code.
<?php
print_r($_SERVER);
?>
The output is not going to be aligned but at least you will get you all the fields, that you want to
observe/debug.
Here is the output for myl ocal xampp installation in root folder.
Array ( [MIBDIRS] => C:/xampp/php/extras/mibs [MYSQL_HOME] => \xampp\mysql\bin [OPENSSL_CONF]
=> C:/xampp/apache/bin/openssl.cnf [PHP_PEAR_SYSCONF_DIR] => \xampp\php [PHPRC] =>
\xampp\php [TMP] => \xampp\tmp [HTTP_HOST] => localhost:8080 [HTTP_USER_AGENT] =>
Mozilla/5.0 (Windows NT 5.1; rv:6.0) Gecko/20100101 Firefox/6.0 [HTTP_ACCEPT] =>
text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 [HTTP_ACCEPT_LANGUAGE] =>
en-us,en;q=0.5 [HTTP_ACCEPT_ENCODING] => gzip, deflate [HTTP_ACCEPT_CHARSET] =>
ISO-8859-1,utf-8;q=0.7,*;q=0.7 [HTTP_CONNECTION] => keep-alive [HTTP_COOKIE] =>
PHPSESSID=spl3n4chd38lqgr8621guqq4d2 [HTTP_CACHE_CONTROL] => max-age=0 [PATH] =>
C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\system32\wbem;C:\Program Files\Microsoft SQL
Server\90\Tools\binn;C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727;C:\Documents and Settings\Hammad
Khan\My Documents\Downloads\gzip;C:\Program Files\TortoiseHg;C:\Program Files\WinMerge;C:\Program
Files\TortoiseSVN\bin;C:\Program Files\Common Files\GTK\2.0\bin;C:\xampp\mysql\bin [SystemRoot]
=> C:\WINDOWS [COMSPEC] => C:\WINDOWS\system32\cmd.exe [PATHEXT] =>
.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH [WINDIR] => C:\WINDOWS [SERVER_SIGNATURE] =>
Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4 Perl/v5.10.1 Server at
localhost Port 8080
[SERVER_SOFTWARE] => Apache/2.2.17 (Win32) mod_ssl/2.2.17 OpenSSL/0.9.8o PHP/5.3.4 mod_perl/2.0.4
Perl/v5.10.1 [SERVER_NAME] => localhost [SERVER_ADDR] => 127.0.0.1 [SERVER_PORT] => 8080
[REMOTE_ADDR] => 127.0.0.1 [DOCUMENT_ROOT] => C:/xampp/htdocs [SERVER_ADMIN] =>
postmaster@localhost [SCRIPT_FILENAME] => C:/xampp/htdocs/server.php [REMOTE_PORT] => 4684
[GATEWAY_INTERFACE] => CGI/1.1 [SERVER_PROTOCOL] => HTTP/1.1 [REQUEST_METHOD] => GET
[QUERY_STRING] => [REQUEST_URI] => /server.php [SCRIPT_NAME] => /server.php [PHP_SELF]
=> /server.php [REQUEST_TIME] => 1314711723 )