MACROMEDIA COLDFUSION 5-CFML Quick Reference

Other manuals for COLDFUSION 5-CFML: Reference

Summary of COLDFUSION 5-CFML

  • Page 1

    Macromedia® incorporated cfml quick reference © 2001 macromedia incorporated. All rights reserved. This manual, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. The content of this manual is furnished for...

  • Page 3

    Cfml quick reference iii contents cfml tags ............................................................. 1 cfml functions .................................................. 14 array functions .....................................................................14 authentication functions .............

  • Page 4

    Iv cfml quick reference cfservlet variables .......................................................... 26 standard cgi variables ......................................27 request ................................................................................... 27 server ...............................

  • Page 5: Cfml Tags

    Cfml quick reference 1 cfml tags cfabort cfapplet name = "form_variable_name" height = "height_in_pixels" width = "width_in_pixels" vspace = "space_above_and_below_in_pixels" hspace = "space_on_each_side_in_pixels" align = "left" or "right" or "bottom" or "top" or "texttop" or "middle" or "absmiddle...

  • Page 6

    2 cfml quick reference cfcookie value = "text" expires = "period" secure = "yes" or "no" path = "url" domain = ".Domain"> cfdirectory directory = "directory name" name = "query name" filter = "list filter" mode = "permission" sort = "sort specification" newdirectory = "new directory name"> cfdump cf...

  • Page 7

    Cfml quick reference 3 enablecab = "yes" or "no" onsubmit = "javascript" target = "window_name" enctype = "type" passthrough = "html_attributes" codebase = "url" archive = "url" > ... Cfftp username = "name" password = "password" server = "server" timeout = "timeout in seconds" port = "port" connect...

  • Page 8

    4 cfml quick reference fileformat = "flash", "gif" or "jpg" linecolor = "web color" linewidth = integer number of pixels fill = "yes" or "no" graphheight = integer number of pixels graphwidth = integer number of pixels backgroundcolor = "web color" bordercolor = "web color" borderwidth = integer num...

  • Page 9

    Cfml quick reference 5 rowheadertextcolor = "web color" rowheaderwidth = "col_width" colheaders = "yes" or "no" colheaderalign = "position" colheaderfont = "font_name" colheaderfontsize = "size" colheaderitalic = "yes" or "no" colheaderbold = "yes" or "no" colheadertextcolor = "web color" bgcolor = ...

  • Page 10

    6 cfml quick reference cfhttp port = "port_number" method = "get_or_post" username = "username" password = "password" name = "queryname" columns = "query_columns" path = "path" file = "filename" delimiter = "character" textqualifier = "character" resolveurl = "yes" or "no" proxyserver = "hostname" p...

  • Page 11

    Cfml quick reference 7 cfinsert dbtype = "type" dbserver = "dbms" dbname = "database name" tablename = "tbl_name" connectstring = "connection string" tableowner = "owner" tablequalifier = "tbl_qualifier" username = "username" password = "password" provider = "comprovider" providerdsn = "datasource" ...

  • Page 12

    8 cfml quick reference cfmail from = "sender" cc = "copy_to" bcc = "blind_copy_to" subject = "msg_subject" type = "msg_type" maxrows = "max_msgs" mimeattach = "path" query = "query_name" group = "query_column" groupcasesensitive = "yes" or "no" startrow = "query_row" server = "servername" port = "po...

  • Page 13

    Cfml quick reference 9 timeout = "seconds" maxrows = "number" startrow = "number" generateuniquefilenames = "boolean"> cfprocessingdirective suppresswhitespace = "yes" or "no"> … any cfml tags here … suppresswhitespace = "yes" or "no"> … any cfml tags here … cfprocparam variable = "variable name" db...

  • Page 14

    10 cfml quick reference cfreport orderby = "result_order" username = "username" password = "password" formula = "formula"> orderby = "result_order" username = "username" password = "password" formula = "formula"> cfrethrow cfsavecontent content cfschedule task = "taskname" operation = "httprequest" ...

  • Page 15

    Cfml quick reference 11 cfservletparam ...> value = "servlet parameter value"> ... Variable = "coldfusion variable name" type = "int" or "double" or "bool" or "date" or "string"> ... ...> value = "servlet parameter value"> ... Variable = "coldfusion variable name" type = "int" or "double" or "bool" ...

  • Page 16

    12 cfml quick reference cftable maxrows = "maxrows_table" colspacing = "number_of_spaces" headerlines = "number_of_lines" htmltable border colheaders startrow = "row_number"> maxrows = "maxrows_table" colspacing = "number_of_spaces" headerlines = "number_of_lines" htmltable border colheaders startro...

  • Page 17

    Cfml quick reference 13 imgopen = "filename" href = "url" target = "url_target" query = "queryname" queryasroot = "yes" or "no" expand = "yes" or "no"> cftry cfcatch ... Add code here ... Add exception processing code here ... Additional cfcatch blocks go here cfupdate dbtype = "type" dbserver = "db...

  • Page 18: Cfml Functions

    14 cfml quick reference 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) a...

  • Page 19

    Cfml quick reference 15 daysinmonth(date) daysinyear(date) firstdayofmonth(date) gethttptimestring(date_time_object) gettimezoneinfo() hour(date) isdate(string) isleapyear(year) isnumericdate(number) lsdateformat(date [, mask ]) lsisdate(string) lsparsedatetime(date/time-string) lstimeformat(time [,...

  • Page 20

    16 cfml quick reference lseurocurrencyformat(currency-number [, type ]) lsnumberformat(number [, mask ]) lstimeformat(time [, mask ]) numberformat(number [, mask ]) paragraphformat(string) timeformat(time [, mask ]) yesnoformat(value) dynamic evaluation functions de(string) evaluate(string_express1 ...

  • Page 21

    Cfml quick reference 17 mathematical functions abs(number) acos(number) 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) bitsh...

  • Page 22

    18 cfml quick reference formatbasen(number, radix) 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) listvaluecount(list, value [, delimiters ]) listv...

  • Page 23

    Cfml quick reference 19 structkeyarray(structure) structkeyexists(structure, key) structkeylist(structure, [delimiter]) structnew() structsort(base, pathtosubelement, sortorder, sorttype) structupdate(structure, key, value) system functions directoryexists(absolute_path) expandpath(relative_path) fi...

  • Page 24: Coldfusion Variables

    20 cfml quick reference 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 col...

  • Page 25

    Cfml quick reference 21 custom tag variables any coldfusion custom tag returns the following variables: thistag.Executionmode thistag.Hasendtag thistag.Generatedcontent thistag.Assocattribs[index] a custom tag can also set a caller variable to provide infor- mation to the caller. The caller variable...

  • Page 26

    22 cfml quick reference coldfusion tag-specific variables a number of coldfusion tags return data as variables. For example, the cffile tag returns file size information in the filesize variable, referenced as cffile.Filesize. The following tags return data that can be referenced in vari- ables: • c...

  • Page 27

    Cfml quick reference 23 cfdirectory variables when used with action=list, cfdirectory returns a query object. Queryname is the value of the name attribute used in the cfdirectory operation. Queryname.Name queryname.Size queryname.Type queryname.Datelastmodified queryname.Attributes queryname.Mode cf...

  • Page 28

    24 cfml quick reference cffile action=upload variables file variables are read-only. Use the cffile. Prefix to refer- ence file variables: cffile.Clientdirectory. Note that although still supported, the file. Prefix is deprecated in favor of the cffile. Prefix. Cffile.Attemptedserverfile cffile.Clie...

  • Page 29

    Cfml quick reference 25 cfftp query object columns when you use cfftp with the listdir action, cfftp returns a query object. Queryname is the value of the name attribute used in the cfftp operation. Row is the row number for each file/directory entry returned by the listdir operation. Queryname.Name...

  • Page 30

    26 cfml quick reference cfquery and cfstoredproc variables in addition to returning data from a coldfusion data source, the cfquery tag returns information about the query: cfquery.Executiontime cfquery also uses the name of the query to scope data about the query: queryname.Currentrow queryname.Rec...

  • Page 31: Standard Cgi Variables

    Cfml quick reference 27 standard cgi variables this is a list of cgi 1.1 variables many web servers create when a cgi script is called. Note: the cgi variables that are available for your use vary with the web server and configuration. Some of the follow- ing variables may not be available to you. R...

  • Page 32

    28 cfml quick reference coldfusion studio keyboard shortcuts studio offers a full set of keyboard commands for its tools and functions. The list below generally matches the order of the menu commands, with related shortcuts added. You can change shortcut key combinations and add new ones by opening ...

  • Page 33

    Cfml quick reference 29 goto previous start tag ctrl + [ (left bracket) go to top of window ctrl + pgup go to bottom of window ctrl + pgdn delete line ctrl + y delete string ctrl + del delete previous string ctrl + backspace search > find ctrl + f search > replace ctrl + r search > find next f3 sear...

  • Page 34

    30 cfml quick reference tags > insert br tag shift + ctrl + b tags > insert br tag and new line ctrl + enter tags > insert align center code shift + ctrl + c tags > insert comment tag shift + ctrl + m tags > open img dialog shift + ctrl + i tags > insert italic tag ctrl + i tags > insert non-breakin...

  • Page 35

    Cfml quick reference 31 debugger keyboard shortcuts show tag tip for current tag (esc to close) f2 show tag insight for current tag (esc to close) shift + f2 debugger shortcuts command key start/continue ctrl + f5 start - no debugging ctrl + alt + f5 end alt + f5 restart ctrl + shift + f5 step into ...

  • Page 36

    32 cfml quick reference.