Query: getenv
OS: php
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
GETENV(3) 1 GETENV(3) getenv - Gets the value of an environment variableSYNOPSISstring getenv (string $varname)DESCRIPTIONGets the value of an environment variable. You can see a list of all the environmental variables by using phpinfo(3). Many of these variables are listed within RFC 3875, specifi- cally section 4.1, "Request Meta-Variables".PARAMETERSo $varname - The variable name.RETURN VALUESReturns the value of the environment variable $varname, or FALSE if the environment variable $varname does not exist.EXAMPLESExample #1 getenv(3) Example <?php // Example use of getenv() $ip = getenv('REMOTE_ADDR'); // Or simply use a Superglobal ($_SERVER or $_ENV) $ip = $_SERVER['REMOTE_ADDR']; ?>SEE ALSOputenv(3), apache_getenv(3), Superglobals. PHP Documentation Group GETENV(3)
Related Man Pages |
---|
getenv(3) - suse |
getenv(3) - centos |
secure_getenv(3) - centos |
getenv_r(3) - netbsd |
getenv(3c) - sunos |
Similar Topics in the Unix Linux Community |
---|
getenv(3c) |