Coldfusion Variables; Variable Scope; Client Variables; Server Variables - MACROMEDIA COLDFUSION 4.5-QUICK REFERENCE TO CFML Quick Reference

Table of Contents

Advertisement

ColdFusion Variables

ColdFusion returns a wide variety of variables, such as those
returned in a CFDIRECTORY or CFFTP operation. Variables
are usually referenced by "scoping" the variable according to
its type, as in Session.varname, or Application.varname.

Variable scope

ColdFusion supports the Variables scope. Unscoped vari-
ables created with the CFSET tag acquire the Variables scope
by default. For example, the variable created by:
<CFSET linguist = Chomsky>
can be referenced as:
#Variables.linguist#

Client variables

These client variables are read-only.
Client.CFID
Client.CFToken
Client.HitCount
Client.LastVisit
Client.TimeCreated
Client.URLToken

Server variables

Use the Server. prefix to reference server variables:
Server.ColdFusion.ProductName
Server.ColdFusion.ProductVersion
Server.ColdFusion.ProductLevel
Server.ColdFusion.SerialNumber
Server.ColdFusion.SupportedLocales
Server.OS.Name
Server.OS.AdditionalInformation
Server.OS.Version
Server.OS.BuildNumber

Application and session variables

Use CFAPPLICATION to enable application and session vari-
ables. They are referenced as:
Application. myvariable
Session. myvariable
Use CFLOCK to ensure that modifications to shared data
occur one after another. See CFML Language Reference
description of CFLOCK for details.
The predefined application and session variables are:
Application.ApplicationName
Session.CFID
Session.CFToken
Session.URLToken
18
Quick Reference to CFML

Advertisement

Table of Contents
loading

This manual is also suitable for:

Coldfusion 4.5

Table of Contents