Chapter 1: ColdFusion Tags
15
<BODY bgcolor="#FFFFD5">
<H3>CFAPPLICATION Example</H3>
<P>CFAPPLICATION defines scoping for a ColdFusion application and
enables or disables the storing of application and/or session
variables. This tag is placed in a special file called
Application.cfm that is run before any other CF template in a
directory where the Application.cfm file appears.
<CFAPPLICATION NAME="ETurtle" SESSIONTIMEOUT=#CreateTimeSpan(0, 0,
0, 60)# SESSIONMANAGEMENT="yes">
<!-------------------------------------------------------------
Initialize the session and application variables that will be
used by E-Turtleneck. Use the session scope for the session
variables.
--------------------------------------------------------------->
<CFLOCK SCOPE="Session" TIMEOUT="30" TYPE="Exclusive">
<CFIF NOT IsDefined("session.size")>
<CFSET session.size = "">
</CFIF>
<CFIF NOT IsDefined("session.color")>
<CFSET session.color = "">
</CFIF>
</CFLOCK>
<!----------------------------------------------------------------
Use the application scope for the application variable. This
variable keeps track of the total number of turtlenecks sold.
------------------------------------------------------------------->
<CFLOCK SCOPE="Application" TIMEOUT="30" TYPE="Exclusive">
<CFIF NOT IsDefined("application.number")>
<CFSET application.number = 1>
</CFIF>
</CFLOCK>
<CFLOCK SCOPE="Application" TIMEOUT="30" TYPE="ReadOnly">
<CFOUTPUT>
E-Turtleneck is proud to say that we have sold
#application.number# turtlenecks to date.
</CFOUTPUT>
</CFLOCK>
<!--- End of Application.cfm --->
Содержание COLDFUSION 4.5-CFML LANGUAGE
Страница 1: ...Allaire Corporation CFML Language Reference ColdFusion 4 5...
Страница 207: ...Chapter 1 ColdFusion Tags 183 CFCATCH CFTRY BODY HTML...
Страница 224: ...200 CFMLLanguageReference CFOUTPUT P Text within CFOUTPUT is always shown CFOUTPUT BODY HTML...
Страница 296: ...272 CFMLLanguageReference INPUT TYPE text NAME number2 BR INPUT TYPE submit NAME submit VALUE Add FORM BODY HTML...
Страница 336: ...312 CFMLLanguageReference CFIF BODY HTML...
Страница 404: ...380 CFMLLanguageReference DE It is morning CFOUTPUT P BODY HTML...
Страница 413: ...Chapter 2 ColdFusion Functions 389 Customer BalanceDue BR CFOUTPUT CFIF BODY HTML...
Страница 483: ...Chapter 2 ColdFusion Functions 459 CFOUTPUT CFLOOP BODY HTML...
Страница 557: ...Chapter 2 ColdFusion Functions 533 P CFOUTPUT Value i is employee keysToStruct i CFOUTPUT P CFLOOP CFIF BODY HTML...
Страница 584: ...560 CFMLLanguageReference...
Страница 594: ...570 CFMLLanguageReference...