Page History
...
How the script or executable uses environment variables will vary depending on the language you have used to write your script or executable. The following examples illustrate how environment variables are accessed in several common languages.
Language | Common methods of accessing environment variables |
---|---|
Perl | Use of the ENV array to access environment variables with Perl. For example:
|
PHP | When run from the command line, use the getenv() function to access environment variables within PHP. For example:
|
Bash and Ksh | Bash and Ksh enable you to access local environment variables just like any other local variable. For example:
|
Batch File | Add the % symbol around the names of environment variables in Windows batch files. For example:
|
VB Script | Use the the
|