share the PHP function getenv Use instance, the GETENV function is mainly used to get the value of an environment variable, the common PHP probe program is to use the getenv function.
Getenv (PHP 4, PHP 5)
Getenv-gets the value of an environment variable
Function Description: www.jbxue.com
String getenv (String $varname)
Gets the value of an environment variable.
With Phpinfo () you can see a list of all the environment variables.
Parameter description:
$varname variable name.
function return value:
Returns the value of the environment variable varname and returns FALSE if the environment variable varname does not exist.
Function Application Example:
PHP// getenv () Use example $ipgetenv(' remote_addr '); // or simply use global variables ($_server or $_env) $ip $_server [' REMOTE_ADDR '];? >
Through Phpinfo can see the entire PHP environment configuration information, then want to get one of the variable information to do?
Get the following information:
PHP Code:
Echo getenv (' UserProfile '); // C:\Windows\system32\config\systemprofile
http://www.bkjia.com/PHPjc/768445.html www.bkjia.com true http://www.bkjia.com/PHPjc/768445.html techarticle share the PHP function getenv Use instance, the GETENV function is mainly used to get the value of an environment variable, the common PHP probe program is to use the getenv function. Getenv (PHP 4, PHP 5)//getenv get ...