This section provides a tutorial example on how to dump Web server information stored in the $_SERVER array.
Now, let's run HttpRequestDetails.php on the local IIS Web server. First copy
HttpRequestDetails.php to \inetpub\wwwroot, then run Internet Explorer (IE) with
http://localhost/HttpRequestDetails.php. You should get:
Note that $_GET, $_POST, $_COOKIE, and $_REQUEST are still all empty, because HTTP request contains
no information submitted using the GET or POST method. And there is no cookies in the HTTP request.
However, other information contained in the HTTP request and gathered from the Web server
is stored in the $_SERVER array now.
For example, "DOCUMENT_ROOT = c:/inetpub/wwwroot" is piece of information from the Web server
telling us that the Web server picks up HTTP documents and scripts from the c:/inetpub/wwwroot directory.