|
getenvGets the value of a single or all environment variables Description
stringarrayfalse getenv(stringnull
$name = null , bool $local_only = false )Gets the value of a single or all environment variables. You can see a list of all the environmental variables by using phpinfo. Many of these variables are listed within » RFC 3875, specifically section 4.1, "Request Meta-Variables". Parameters
Return Values
Returns the value of the environment variable
Changelog
Examples
Example #1 getenv Example
NotesWarning
If PHP is running in a SAPI such as Fast CGI, this function will
always return the value of an environment variable set by the SAPI,
even if putenv has been used to set a local
environment variable of the same name. Use the |