Php/docs/function.putenv
From Get docs
putenv
(PHP 4, PHP 5, PHP 7)
putenv — Sets the value of an environment variable
Description
putenv
( string $setting
) : bool
Adds setting
to the server environment. The
environment variable will only exist for the duration of the current
request. At the end of the request the environment is restored to its
original state.
Parameters
setting
- The setting, like
"FOO=BAR"
Return Values
Returns TRUE
on success or FALSE
on failure.
Examples
Example #1 Setting an environment variable
<?phpputenv("UNIQID=$uniqid");?>
See Also
- getenv() - Gets the value of an environment variable
- apache_setenv() - Set an Apache subprocess_env variable