putenv() is a PHP function used to set the value of an environment variable. Versions: PHP 4, PHP 5, PHP 7, PHP 8.
|
Note: The environment variable will only exist for the duration of the request. The environment will be reset to its previous state after the end of the request. |
putenv() can have a single parameter:
assignment: the name of the environment variable, and its value.
setcookie() will return true if the operation has successfully completed, false if it has failed.