Description
This function sets the value of an environment variable. The system stores the value in the /home/$user/.cpanel/nvdata
directory.
Warning:
- UAPI (recommended) — None.
- cPanel API 2 —
NVData::set
— This function creates a non-volatile datastore.
Examples
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
name |
string |
Required An environment variable. |
A valid environment variable name. |
location |
value |
string |
Required The environment variable's value. |
Any valid string. |
Houston |
nocache |
boolean |
Required Whether to cache the value. The cache improves system performance. |
|
0 |
Returns
This function does not return output.