• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

How to set a global variable

Explorer ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

Hi,

How can I set a global variable and how do i "get" that variable?

Thanks
TOPICS
Advanced techniques

Views

348

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

create an application.cfm fil on the root of your app folder
and in there type:

<cfscript>
Request.YourVariable = 'Hello World';
</cfscript>


Then you can call it in any other page like this
<cfoutput>#Request.YourVariable#</cfoutput>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Oct 12, 2006 Oct 12, 2006

Copy link to clipboard

Copied

LATEST
How do I set the globale variable by use of another local var?

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation