Get all server variables in PHP

Description

The following code shows how to get all server variables.

Example


<?php/* ww w.  java 2  s. c  o m*/

foreach ($_SERVER as $var => $value) {
   echo "$var => $value <br />";
}

?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Development »




Environment
Error
Hash
Include
Locale
Math
Network
Output
Reflection
PHP Regular Expressions