getenv

string getenv(string name) 

Gets an environment variable value.

Returns:

Environment variable setting; FALSE on error

Description:

Retrieves the name of an environment variable from the system. This may be path information, the location of the system temporary directory, etc. The availability of various environment variables differs from system to system. A mostly complete list can be displayed using phpinfo(). Other system information items such as PATH and PROMPT are global but not terribly useful. If PHP is an Apache module, those environment variables displayed in phpinfo are variables in the GLOBAL variable space within the script.

getenv() can help improve security by ensuring that a script is accessing the value of an environment ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.