System.getEnvVar
System.getEnvVar($variableName, $default='') -> any
Description
Get an environment variable set for the local server.
If the variable does not exist, it will return $default
.
NoteThis will only return environment variables that are visible to the current user the webserver is running as.
System.getEnvVar('USER') //= 'www-data' System.getEnvVar('NON_EXISTENT', 'myDefault') //= 'myDefault'