Description
This function retrieves an environment variable's value.
Examples
Note:
Use cPanel's API Shell interface (Home >> Advanced >> API Shell) to directly test cPanel API calls.
Parameters
Parameter |
Type |
Description |
Possible values |
Example |
names |
string |
Required The file or files to retrieve. |
A valid file path, relative to the /home/user/.cpanel/nvdata directory, where user represents the cPanel user. Note: To retrieve multiple files, separate each file with a pipe (|) character. |
testfile |
Returns
Return |
Type |
Description |
Possible values |
Example |
|
array of hashes |
An array of hashes that contains information about the non-volatile data. |
This array of hashes includes the nameand value returns. |
|
name |
string |
The file's name. The function returns this value in the unnamedhash. |
A valid string. |
testfile |
value |
string |
The file's contents. The function returns this value in the unnamedhash. |
A valid string. |
testvalue |