#VarENV ---+++ ENV{"varname"} -- inspect the value of an environment variable * Returns the current value of the environment variable in the CGI (Common Gateway Interface) environment. This is the environment that the TWiki scripts run in on the web server. * __Note:__ For security reasons, only those variables whose names match the regular expression in ={AccessibleENV}= in the *Security Settings/Miscellaneous* section of =configure= can be displayed. Any other variable will just be shown as an empty string, irrespective of its real value. * Example: =%<nop>ENV{MOD_PERL}%= displays as: %ENV{MOD_PERL}% * If a variable is undefined (as against being set to the empty string) it will be returned as =not set=. * Category: SystemInformationVariables * Related: [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarHTTPHOST][HTTP_HOST]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarREMOTEADDR][REMOTE_ADDR]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarREMOTEPORT][REMOTE_PORT]], [[%IF{"'%INCLUDINGTOPIC%'='TWikiVariables'" then="#"}%VarREMOTEUSER][REMOTE_USER]]
This topic: TWiki
>
WebHome
>
TWikiVariables
>
VarENV
Topic revision: r2 - 2012-11-12 - TWikiContributor
Copyright © 1999-2025 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki?
Send feedback
Note:
Please contribute updates to this topic on TWiki.org at
TWiki:TWiki.VarENV
.