开发者

CFML system environment variable (OpenBD)

开发者 https://www.devze.com 2023-02-28 15:59 出处:网络
How do I access the system environment variables in CFML? It is required to read out the CloudFoundry database connectivity settings.

How do I access the system environment variables in CFML? It is required to read out the CloudFoundry database connectivity settings.

The variable required is "VCAP_SERVICES".

Is ther开发者_如何学Ce a function for that?

Thanks,

Yvan


Following solution seems to work very-very partially on my Ubuntu (it gets far from all variables listed by env -- bit this may be fine because JVM just does not get most of these), but it may somehow work for you:

<cfset properties = createObject("java", "java.lang.System").properties />
<cfdump var="#properties#">

Variable you are looking for can be prefixed with user.

0

精彩评论

暂无评论...
验证码 换一张
取 消