Detailed instructions for use are in the User's Guide.
[. . . ] or other entities and may be registered in certain jurisdictions including internationally. This guide contains links to third-party websites that are not under the control of Macromedia, and Macromedia is not responsible for the content on any linked site. If you access a third-party website mentioned in this guide, then you do so at your own risk. Macromedia provides these links only as a convenience, and the inclusion of the link does not imply that Macromedia endorses or accepts any responsibility for the content on those third-party sites. [. . . ] ---> <cfobject webservice = "web service name" name = "mystringname for instantiated object" method = "operation_name"> <cfinvoke <!--- value is object name, within pound signs ---> webservice = "#my stringname for instantiated web service#" timeout = "request timeout in seconds" proxyServer = "WSDL proxy server url proxyPort = "numeric port on proxy server" proxyUser = "string user id for proxy server" proxyPassword = "string user password for proxy server">
cfinvokeargument
<cfinvokeargument name="argument name" value="argument value">
cfldap
<cfldap server = "server_name" port = "port_number" username = "name" password = "password" action = "action" name = "name" timeout = "seconds" maxRows = "number" start = "distinguished_name" scope = "scope" attributes = "attribute, attribute" filter = "filter" sort = "attribute[, attribute]. . . " sortControl = "nocase" and/or "desc" or "asc" dn = "distinguished_name" startRow = "row_number"
12
CFML Quick Reference
modifyType = "replace" or "add" or "delete" rebind = "Yes" or "No" referral = "number_of_allowed_hops" secure = "multi_field_security_string" separator = "separator_character" delimiter = "delimiter_character">
cflocation
<cflocation url = "url" addToken = "Yes" or "No">
cflock
<cflock timeout = "timeout in seconds " scope = "Application" or "Server" or "Session" name = "lockname" throwOnTimeout = "Yes" or "No" type = "readOnly" or "exclusive "> <!--- CFML to be synchronized ---> </cflock>
cflog
<cflog text = "text" log = "log type" file = "filename" type = "message type" application = "application name yes or no">
cflogin
<cflogin idletimeout = "value" applicationToken = "token" cookieDomain = "domain" . . . <cfloginuser name = "name" password = "password-string" roles = "roles"> . . . > </cflogin>
cfloginuser
<cfloginuser name = "name" password = "password-string" roles = "roles">
cflogout
<cflogout>
cfloop
<cfloop index = "parameter_name" from = "beginning_value" to = "ending_value" step = "increment"> . . . </cfloop> <cfloop query = "query_name" startRow = "row_num" endRow = "row_num"> </cfloop> <cfloop index = "index_name" list = "list_items" delimiters = "item_delimiter"> . . . </cfloop>
cfmail
<cfmail to = "recipient" from = "sender" cc = "copy_to" bcc = "blind_copy_to" subject = "msg_subject" replyto = "reply_to_addr" failto = "fail_message_addr"
CFML Quick Reference
13
username = "user name" password = "password" wraptext = "column number" charset = "character encoding" type = "msg_type" mimeattach = "path" query = "query_name" group = "query_column" groupcasesensitive = "yes" or "no" startrow = "query_row" maxrows = "max_msgs" server = "serverspecs" port = "port_id" mailerid = "headerid" timeout = "seconds" spoolenable = "yes" or "no">
cfmailparam
<cfmail to = "recipient" subject = "msg_subject" from = "sender" . . . more attributes. . . > <cfmailparam file = "file-name" type ="media type"> OR <cfmailparam name = "header-name" value = "header-value" > . . . > (Optional cfmailparam entries) <cfmailpart type="mime type" charset="character encoding" wraptext="number"> . . . </cfmail>
cfmodule
<cfmodule template = "path" name = "tag_name" attributeCollection = "collection_structure" attribute_name1 = "valuea" attribute_name2 = "valueb" . . . >
cfobject
<cfobject type = "com" action = "action" class = "program_ID" name = "text" context = "context" server = "server_name"> <cfobject name = "variable name" component = "component name"> <cfobject type = "corba" context = "context" class = "file or naming service" name = "text" locale = "type-value arguments"> <cfobject type = "Java" action = "Create" class = "Java class" name = "object name"> <cfobject webservice= "http://. . . . ?wsdl" or "name set in Administrator" name = "myobjectname">
14
CFML Quick Reference
cfobjectcache
<cfobjectcache action = "clear">
cfoutput
<cfoutput query = "query_name" group = "query_column" groupCaseSensitive = "Yes" or "No" startRow = "start_row" maxRows = "max_rows_output"> </cfoutput>
cfparam
<cfparam name = "param_name" type = "data_type" default = "value">
cfpop
<cfpop server = "servername" port = "port_number" username = "username" password = "password" action = "action" name = "queryname" messageNumber = "number" uid = "number" attachmentPath = "path" timeout = "seconds" maxRows = "number" startRow = "number" generateUniqueFilenames = "boolean">
cfprocessingdirective
<cfprocessingdirective pageencoding = "page-encoding literal string" /> OR <cfprocessingdirective suppressWhiteSpace = "Yes" or "No" pageEncoding = "page-encoding literal string"> CFML tags </cfprocessingdirective>
cfprocparam
<cfprocparam type = "in" or "out" or "inout" variable = "variable name" value = "parameter value" CFSQLType = "parameter datatype" maxLength = "length" scale = "decimal places" null = "Yes" or "No">
cfprocresult
<cfprocresult name = "query_name" resultSet = "1-n" maxRows = "maxrows">
cfproperty
<cfproperty name="name" type="type" required="boolean" default="default value" displayname="descriptive name" hint="extended description">
cfquery
<cfquery name = "query_name" dataSource = "ds_name" dbtype = "query" username = "username" password = "password" maxRows = "number" blockFactor = "blocksize" timeout = "seconds" cachedAfter = "date" cachedWithin = "timespan" Either of the following: debug = "Yes" or "No"
CFML Quick Reference
15
or: debug > SQL statement(s) </cfquery>
cfqueryparam
<cfquery name = "query_name" dataSource = "ds_name" . . . other attributes. . . SQL STATEMENT column_name = <cfqueryparam value = "parameter value" CFSQLType = "parameter type" maxLength = "maximum parameter length" scale = "number of decimal places" null = "Yes" or "No" list = "Yes" or "No" separator = "separator character"> AND/OR . . . additional criteria of the WHERE clause. . . </cfquery>
cfregistry
<cfregistry action = "getAll" branch = "branch" type = "data type" name = "query name" sort = "criteria"> <cfregistry action = "get" branch = "branch" entry = "key or value" variable = "variable" type = "data type"> <cfregistry action = "set" branch = "branch" entry = "key or value" type = "value type" value = "data"> <cfregistry action = "delete" branch = "branch" entry = "keyorvalue">
cfreport
<cfreport report = "report_path" dataSource = "ds_name" type = "type" timeout = "number of seconds" orderBy = "result_order" username = "username" password = "password" formula = "formula"> </cfreport>
cfrethrow
<cfrethrow>
cfreturn
<cfreturn expr>
cfsavecontent
<cfsavecontent variable = "variable name"> the content </cfsavecontent>
cfschedule
<cfschedule action = "update" task = "taskname" operation = "HTTPRequest" file = "filename" path = "path_to_file" startDate = "date" startTime = "time" url = "URL" port = "port_number" publish = "Yes" or "No" endDate = "date" endTime = "time"
16
CFML Quick Reference
interval = "seconds" requestTimeOut = "seconds" username = "username" password = "password" proxyServer = "hostname" proxyPort = "port_number"> proxyUser = "username" proxyPassword = "password" resolveURL = "Yes" or "No" <cfschedule action = "delete" task = "TaskName"> <cfschedule action = "run" task = "TaskName">
cfscript
<cfscript> cfscript code here </cfscript>
cfsearch
<cfsearch name = "search_name" collection = "collection_name" type = "criteria" criteria = "search_expression" maxRows = "number" startRow = "row_number" language = "language">
cfselect
<cfselect name = "name" required = "Yes" or "No" message = "text" onError = "text" size = "integer" multiple = "Yes" or "No" query = "queryname" selected = "column_value" value = "text" display = "text" passThrough = "HTML_attributes"> </cfselect>
cfset
<cfset var variable_name = expression>
cfsetting
<cfsetting enableCFoutputOnly = "Yes" or "No" showDebugOutput = "Yes" or "No" requestTimeOut = "value in seconds" >
cfsilent
<cfsilent> . . . </cfsilent>
cfslider
<cfslider name = "name" label = "text" refreshLabel = "Yes" or "No" range = "min_value, max_value" scale = "uinteger" value = "integer" onValidate = "script_name" message = "text" onError = "text" height = "integer" width = "integer" vSpace = "integer" hSpace = "integer" align = "alignment" tickMarkMajor = "Yes" or "No" tickMarkMinor = "Yes" or "No" tickMarkImages = "URL1, URL2, URLn" tickMarkLabels = "Yes" or "No" or "list" lookAndFeel = "motif" or "windows" or "metal" vertical = "Yes" or "No" bgColor = "color" textColor = "color"
CFML Quick Reference
17
font = "font_name" fontSize = "integer" italic = "Yes" or "No" bold = "Yes" or "No" notSupported = "text">
cfstoredproc
<cfstoredproc procedure = "procedure name" dataSource = "ds_name" username = "username" password = "password" blockFactor = "blocksize" debug = "Yes" or "No" returnCode = "Yes" or "No">
cfswitch
<cfswitch expression = "expression"> One or more cfcase tags Zero or one cfdefaultcase tags </cfswitch>
cftable
<cftable query = "query_name" maxRows = "maxrows_table" colSpacing = "number_of_spaces" headerLines = "number_of_lines" HTMLTable border colHeaders startRow = "row_number"> . . . </cftable>
cftextinput
<cftextinput name = "name" value = "text" required = "Yes" or "No" range = "min_value, max_value" validate = "data_type" pattern = "Java regular expression" onValidate = "script_name" message = "text" onError = "text" size = "integer" font = "font_name" fontSize = "integer" italic = "Yes" or "No" bold = "Yes" or "No" height = "integer" width = "integer" vSpace = "integer" hSpace = "integer" align = "alignment" bgColor = "color" textColor = "color" maxLength = "integer" notSupported = "text">
cfthrow
<cfthrow type = "exception_type " message = "message" detail = "detail_description " errorCode = "error_code " extendedInfo = "additional_information" object = "java_except_object"> OR <cfthrow object = #object_name#>
cftrace
<cftrace abort = "Yes or No" category = "string" inline = "Yes or No" text = "string" type = "format" var = "variable_name" </cftrace>
18
CFML Quick Reference
cftransaction
<cftransaction action = "begin" or "commit" or "rollback" isolation = "read_uncommitted" or "read_committed" or "repeatable_read" > </cftransaction>
cftree
<cftree name = "name" required = "Yes" or "No" delimiter = "delimiter" completePath = "Yes" or "No" appendKey = "Yes" or "No" highlightHref = "Yes" or "No" onValidate = "script_name" message = "text" onError = "text" lookAndFeel = "motif" or "windows" or "metal" font = "font" fontSize = "size" italic = "Yes" or "No" bold = "Yes" or "No" height = "integer" width = "integer" vSpace = "integer" hSpace = "integer" align = "alignment" border = "Yes" or "No" hScroll = "Yes" or "No" vScroll = "Yes" or "No" notSupported = "text"> </cftree>
cftreeitem
<cftreeitem value = "text" display = "text" parent = "parent_name" img = "filename" imgopen = "filename" href = "URL" target = "URL_target" query = "queryname" queryAsRoot = "Yes" or "No" expand = "Yes" or "No">
cftry
<cftry> Code that might throw an exception One or more cfcatch blocks </cftry>
cfupdate
<cfupdate dataSource = "ds_name" tableName = "table_name" tableOwner = "name" tableQualifier = "qualifier" username = "username" password = "password" formFields = "field_names">
cfwddx
<cfwddx action = "action" input = "inputdata" output = "resultvariablename" topLevelVariable = "toplevelvariablenameforjavascript" useTimeZoneInfo = "Yes" or "No" validate = "Yes" or "No" >
cfxml
<CFXML variable="xmlVarName" caseSensitive="yes" or "no">
CFML Quick Reference
19
CFML functions
Array functions
ArrayAppend(array, value) ArrayAvg(array) ArrayClear(array) ArrayDeleteAt(array, position) ArrayInsertAt(array, position, value) ArrayIsEmpty(array) ArrayLen(array) ArrayMax(array) ArrayMin(array) ArrayNew(dimension) ArrayPrepend(array, value) ArrayResize(array, minimum_size) ArraySet(array, start_pos, end_pos, value) ArraySort(array, sort_type [, sort_order ]) ArraySum(array) ArraySwap(array, position1, position2) ArrayToList(array [, delimiter ]) IsArray(value [, number ]) ListToArray(list [, delimiters ])
Authentication functions
GetAuthUser() IsUserInRole("role_name")
Conversion functions
ArrayToList(array [, delimiter ]) Hash(string) LCase(string) ListToArray(list [, delimiters ]) ToBase64(string or binary_object[, encoding]) ToBinary(string_in_Base64 or binary_value) ToString(any_value [, encoding]) URLDecode(urlEncodedString [, charset]) URLEncodedFormat(string [, charset ]) Val(string) XmlFormat(string) XmlParse(xmlString [, caseSensitive ] ) XmlTransform(xmlString | xmlObj, xslString)
Date and time functions
CreateDate(year, month, day) CreateDateTime(year, month, day, hour, minute, second) CreateODBCDate(date) CreateODBCDateTime(date) CreateODBCTime(date) CreateTime(hour, minute, second) CreateTimeSpan(days, hours, minutes, seconds) DateAdd("datepart", number, "date") DateCompare("date1", "date2" [, "datePart"]) DateConvert("conversion-type", "date") DateDiff("datepart", "date1", "date2") DateFormat("date" [, "mask" ]) DatePart("datepart", "date") Day("date") DayOfWeek("date")
20
CFML Quick Reference
DayOfWeekAsString(fu) DayOfYear("date") DaysInMonth("date") DaysInYear("date") FirstDayOfMonth(date) GetHttpTimeString(date_time_object) GetTickCount() GetTimeZoneInfo() Hour(date) IsDate(string) IsLeapYear(year) IsNumericDate(number) LSDateFormat(date [, mask ]) LSIsDate(string) LSParseDateTime(date/time-string) LSTimeFormat(time [, mask ]) Minute(date) Month(date) MonthAsString(month_number) Now() ParseDateTime(date/time-string [, pop-conversion ] ) Quarter(date) Second(date) TimeFormat(time [, mask ]) Week(date) Year(date)
Decision functions
DirectoryExists(absolute_path) FileExists(absolute_path) IIf(condition, string_expression1, string_expression2) IsArray(value [, number ]) IsBinary(value) IsBoolean(value) IsCustomFunction(name) IsDate(string) IsDebugMode() IsDefined("variable_name") IsK2ServerABroker() IsK2ServerDocCountExceeded() IsK2ServerOnline() IsLeapYear(year) IsNumeric(string) IsNumericDate(number) IsObject(value) IsQuery(value) IsSimpleValue(value) IsStruct(variable) IsUserInRole("role_name") IsWDDX(value) IsXmlDoc(value) IsXmlElem(value) IsXmlRoot(value) LSIsCurrency(string) LSIsDate(string) LSIsNumeric(string) StructIsEmpty(structure)
CFML Quick Reference
21
StructKeyExists(structure, "key") YesNoFormat(value)
Display and formatting functions
Cjustify(string, length) DateFormat("date" [, "mask" ]) DecimalFormat(number) DollarFormat(number) FormatBaseN(number, radix) GetLocale() HTMLCodeFormat(string [, version ]) HTMLEditFormat(string [, version ]) LJustify(string, length) LSCurrencyFormat(number [, type ]) LSDateFormat(date [, mask ]) LSEuroCurrencyFormat(currency-number [, type ]) LSIsCurrency(string) LSIsDate(string) LSNumberFormat(number [, mask ]) LSParseCurrency(string) LSParseDateTime(date/time-string) LSParseEuroCurrency(currency-string) LSParseNumber(string) LSTimeFormat(time [, mask ]) NumberFormat(number [, mask ]) ParagraphFormat(string) RJustify(string, length) StripCR(string) TimeFormat(time [, mask ]) YesNoFormat(value) StripCR(string)
Dynamic evaluation functions
DE(string) Evaluate(string_expression1 [, string_expression2 [, . . . ] ] ) IIf(condition, string_expression1, string_expression2) SetVariable(name, value)
Extensibility functions
CreateObject COM object: CreateObject(type, class, context, serverName) component object: CreateObject(type, component-name) CORBA object: CreateObject(type, context, class, locale) Java or EJB object: CreateObject(type, class) ReleaseComObject(objectName) XmlChildPos(elem, childName, N) XmlElemNew(xmlObj, childName) XmlFormat(string) XmlNew([caseSensitive]) XmlParse(xmlString [, caseSensitive ] ) XmlSearch(xmlDoc, xPathString) XmlTransform(xmlString | xmlObj, xslString)
22
CFML Quick Reference
Full-text search functions
ColdFusion MX 6. 1: These functions are deprecated. They might not work, and might cause errors, in a future release.
GetK2ServerDocCount() GetK2ServerDocCountLimit() IsK2ServerABroker() IsK2ServerDocCountExceeded() IsK2ServerOnline()
International functions
DateConvert("conversion-type", "date") GetEncoding(scope_name) GetHttpTimeString(date_time_object) GetLocale() GetTimeZoneInfo() LSIsCurrency(string) LSCurrencyFormat(number [, type ]) LSDateFormat(date [, mask ]) LSEuroCurrencyFormat(currency-number [, type ]) LSIsDate(string) LSParseDateTime(date/time-string) LSIsNumeric(string) LSNumberFormat(number [, mask ]) LSParseCurrency(string) LSParseEuroCurrency(currency-string) LSParseNumber(string) LSTimeFormat(time [, mask ]) SetEncoding(scope_name, charset) SetLocale(new_locale)
List functions
ArraySort(array, sort_type [, sort_order ]) ArrayToList(array [, delimiter ]) Asc(string) Chr(number) Cjustify(string, length) Compare(string1, string2) CompareNoCase(string1, string2) Decrypt(encrypted_string, seed) Encrypt(string, seed) Find(substring, string [, start ]) FindNoCase(substring, string [, start ]) FindOneOf(set, string [, start ]) FormatBaseN(number, radix) GetClientVariablesList() LCase(string) Left(string, count) Len(string or binary object) ListAppend(list, value [, delimiters ]) ListChangeDelims(list, new_delimiter [, delimiters ]) ListContains(list, substring [, delimiters ]) ListContainsNoCase(list, substring [, delimiters ]) ListDeleteAt(list, position [, delimiters ]) ListFind(list, value [, delimiters ]) ListFindNoCase(list, value [, delimiters ]) ListFirst(list [, delimiters ]) ListGetAt(list, position [, delimiters ]) ListInsertAt(list, position, value [, delimiters ])
CFML Quick Reference
23
ListLast(list [, delimiters ]) ListLen(list [, delimiters ]) ListPrepend(list, value [, delimiters ]) ListQualify(list, qualifier [, delimiters ] [, elements ]) ListRest(list [, delimiters ]) ListSetAt(list, position, value [, delimiters ]) ListSort(list, sort_type [, sort_order] [, delimiters ]) ListToArray(list [, delimiters ]) ListValueCount(list, value [, delimiters ]) ListValueCountNoCase(list, value [, delimiters ]) ReplaceList(string, list1, list2)
Mathematical functions
Abs(number) ACos(number) ArrayAvg(array) ArraySum(array) ASin(number) Atn(number) BitAnd(number1, number2) BitMaskClear(number, start, length) BitMaskRead(number, start, length) BitMaskSet(number, mask, start, length) BitNot(number) BitOr(number1, number2) BitSHLN(number, count) BitSHRN(number, count) BitXor(number1, number2) Ceiling(number) Cos(number) DecrementValue(number) Exp(number) Fix(number) FormatBaseN(number, radix) IncrementValue(number) InputBaseN(string, radix) Int(number) Log(number) Log10(number) Max(number1, number2) Min(number1, number2) Pi() Rand() Randomize(number) RandRange(number1, number2) Round(number) Sgn(number) Sin(number) Sqr(number) Tan(number)
Other functions
CreateUUID() Decrypt(encrypted_string, seed) DeleteClientVariable("name") Duplicate(variable_name) Encrypt(string, seed)
24
CFML Quick Reference
GetBaseTagData(tagname [, instancenumber ] ) GetBaseTagList() GetBaseTemplatePath() GetClientVariablesList() GetTickCount() Hash(string) PreserveSingleQuotes(variable) QuotedValueList(query. column [, delimiter ]) StripCR(string) ToBase64(string or binary_object [, encoding ]) ToBinary(string_in_Base64 or binary_value) ToString(any_value [, encoding ]) URLDecode(urlEncodedString [, charset ]) URLEncodedFormat(string [, charset ]) URLSessionFormat(request_URL) ValueList(query. column [, delimiter ]) WriteOutput(string)
Query functions
IsQuery(value) QueryAddColumn(query, column-name, array-name) QueryAddRow(query [, number ]) QueryNew(columnlist) QuerySetCell(query, column_name, value [, row_number ]) QuotedValueList(query. column [, delimiter ]) ValueList(query. column [, delimiter ])
String functions
ColdFusion MX: ColdFusion now supports the Java UCS-2 representation of Unicode character values 065535. (Earlier releases supported ASCII values. ) String-processing functions process any of these characters (including ASCII 0 (NUL) characters), and continue counting subsequent characters of the string, if any. (In earlier releases, some string-processing functions processed the ASCII 0 (NUL) character, but did not process subsequent characters of the string. )
Asc(string) Chr(number) Cjustify(string, length) Compare(string1, string2) CompareNoCase(string1, string2) DayOfWeekAsString(day_of_week) Decrypt(encrypted_string, seed) Encrypt(string, seed) FormatBaseN(number, radix) Find(substring, string [, start ]) FindNoCase(substring, string [, start ]) FindOneOf(set, string [, start ]) GetToken(string, index [, delimiters ]) Hash(string) Insert(substring, string, position) JavaCast(type, variable) JSStringFormat(string) LCase(string) Left(string, count) Len(string or binary object)
CFML Quick Reference
25
LJustify(string, length) ListValueCount(list, value [, delimiters ]) ListValueCountNoCase(list, value [, delimiters ]) LSIsCurrency(string) LSIsDate(string) LSIsNumeric(string) LSParseCurrency(string) LSParseDateTime(date/time-string) LSParseEuroCurrency(currency-string) LSParseNumber(string) LTrim(string) Mid(string, start, count) MonthAsString(month_number) ParagraphFormat(string) ParseDateTime(date/time-string [, pop-conversion ] ) REFind(reg_expression, string [, start ] [, returnsubexpressions ] ) REFindNoCase(reg_expression, string [, start] [, returnsubexpressions] ) RemoveChars(string, start, count) RepeatString(string, count) Replace(string, substring1, substring2 [, scope ]) ReplaceList(string, list1, list2) ReplaceNoCase(string, substring1, substring2 [, scope ]) REReplace(string, reg_expression, substring [, scope ]) REReplaceNoCase(string, reg_expression, substring [, scope ]) Reverse(string) Right(string, count) RJustify(string, length) RTrim(string) SpanExcluding(string, set) SpanIncluding(string, set) StripCR(string) ToBase64(string or binary_object [, encoding]) ToBinary(string_in_Base64 or binary_value) ToString(any_value [, encoding]) Trim(string) UCase(string) URLDecode(urlEncodedString[, charset]) URLEncodedFormat(string [, charset]) Val(string) Wrap(string, limit[, strip]) XmlFormat(string)
Structure functions
Duplicate(variable_name) IsStruct(variable) StructAppend(struct1, struct2, overwriteFlag) StructClear(structure) StructCopy(structure) StructCount(structure) StructDelete(structure, key [, indicatenotexisting ]) StructFind(structure, key) StructFindKey(top, value, scope) StructFindValue( top, value [, scope]) StructGet(pathDesired)
26
CFML Quick Reference
StructInsert(structure, key, value [, allowoverwrite ]) StructIsEmpty(structure) StructKeyArray(structure) StructKeyExists(structure, "key") StructKeyList(structure [, delimiter]) StructNew() StructSort(base, sortType, sortOrder, pathToSubElement) StructUpdate(structure, key, value)
System functions
DirectoryExists(absolute_path) ExpandPath(relative_path) FileExists(absolute_path) GetBaseTemplatePath() GetCurrentTemplatePath() GetDirectoryFromPath(path) GetEncoding(scope_name) GetException(object) GetFileFromPath(path) GetFunctionList() GetHttpRequestData() GetLocale() GetMetaData(object) GetMetaData(this) if used in a ColdFusion component GetMetricData(mode) GetProfileSections(iniFile) GetProfileString(iniPath, section, entry) GetTempDirectory() GetTempFile(dir, prefix) GetPageContext() SetEncoding(scope_name, charset) SetLocale(new_locale) SetProfileString(iniPath, section, entry, value)
XML functions
IsWDDX(value) IsXmlDoc(value) IsXmlElem(value) IsXmlRoot(value) XmlChildPos(elem, childName, N) XmlElemNew(xmlObj, childName) XmlFormat(string) XmlNew([caseSensitive]) XmlParse(xmlString [, caseSensitive ] ) XmlSearch(xmlDoc, xPathString) XmlTransform(xmlString | xmlObj, xslString)
CFML Quick Reference
27
ColdFusion variables
ColdFusion MX returns variables, such as those returned in a cfdirectory or cfftp operation. A variable is usually referenced by scoping it according to its type: naming it according to the code context in which it is available; for example, Session. varname, or Application. varname. You use the cflock tag to limit the scope of CFML constructs that modify shared data structures, files, and CFXs, to ensure that modifications occur sequentially. For more information, see Developing ColdFusion MX Applications.
Variable scope
ColdFusion MX supports the Variables scope. Unscoped variables created with the cfset tag acquire the Variables scope by default. For example, the variable created by the statement <CFSET linguist = Chomsky> can be referenced as #Variables. linguist#
Caller scope
ColdFusion MX supports the Caller scope as a structure.
Client variables
The following 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, as follows: 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
To enable application and session variables, use the cfapplication tag. [. . . ] Use the CFFILE prefix to reference file variables; for example, CFFILE. ClientDirectory. CFFILE. AttemptedServerFile CFFILE. ClientDirectory CFFILE. ClientFile CFFILE. ClientFileExt CFFILE. ClientFileName CFFILE. ContentSubType CFFILE. ContentType CFFILE. DateLastAccessed CFFILE. FileExisted CFFILE. FileSize CFFILE. FileWasAppended CFFILE. FileWasOverwritten CFFILE. FileWasRenamed CFFILE. FileWasSaved CFFILE. OldFileSize CFFILE. ServerDirectory CFFILE. ServerFile CFFILE. ServerFileExt CFFILE. ServerFileName CFFILE. TimeCreated CFFILE. TimeLastModified
CFFTP error variables
When you use the cfftp stoponerror attribute, these variables are populated: CFFTP. Succeeded CFFTP. ErrorCode CFFTP. ErrorText
CFFTP ReturnValue variable
Some cfftp file and directory operations provide a return value, in the variable CFFTP. ReturnValue. When you specify any of the following actions, cfftp returns a value: GetCurrentDir GetCurrentURL ExistsDir ExistsFile Exists
CFFTP query object columns
When you use the cfftp tag with the listdir action, cfftp returns a query object, where queryname is the name attribute value, and row is the row number of each file or directory entry: queryname. Name[row] queryname. Path[row] queryname. URL[row] queryname. Length[row] queryname. LastModified[row] queryname. Attributes queryname. IsDirectory queryname. Mode
CFML Quick Reference
31
CFHTTP variables
A cfhttp get operation can return text and binary files. Files are downloaded and the contents stored in a variable or file, depending on the MIME type, as follows: CFHTTP. FileContent CFHTTP. MimeType CFHTTP. Header CFHTTP. ResponseHeader[http_hd_key] CFHTTP. StatusCode
CFLDAP variables
The cfldap action=query tag returns information about the LDAP query, as follows: queryname. CurrentRow queryname. RecordCount queryname. ColumnList
CFPOP variables
The cfpop tag returns the following result columns, depending on the action attribute value and the use of other attributes, such as attachmentpath, where queryname is the name attribute value: queryname. Date queryname. From queryname. Body queryname. Header queryname. MessageNumber queryname. ReplyTo queryname. Subject queryname. CC queryname. To queryname. CurrentRow queryname. RecordCount queryname. ColumnList queryname. Attachments queryname. AttachmentFiles
CFQUERY and CFSTOREDPROC variables
The cfquery tag returns information about the query in this variable: CFQUERY. ExecutionTime The cfquery tag uses the query name to scope the following data about the query: queryname. CurrentRow queryname. RecordCount queryname. ColumnList The cfstoredproc tag returns the following variables: CFSTOREDPROC. ExecutionTime CFSTOREDPROC. StatusCode
CFREGISTRY variables
The cfregistry tag returns a query record set that you can reference after executing the GetAll action, as follows, where queryname is the name attribute value: queryname. Entry queryname. Type queryname. Value
CFSEARCH variables
A cfsearch operation returns the following variables, where searchname is the name attribute value: searchname. URL searchname. Key
32 CFML Quick Reference
searchname. Title searchname. Score searchname. Custom1 and Custom2 searchname. Summary searchname. RecordCount searchname. CurrentRow searchname. RecordsSearched searchname. ColumnList
Standard CGI variables
This section lists the CGI 1. 1 variables that some web servers create when a CGI script is called. [. . . ]