February 10, 2002
Passing invalid dates to any CFML date functions will throw an error. If you ever accept dates from users (or any other sources) you must verify that the specified dates are valid before you use them. The simplest way to do this is to use the IsDate() function. But, this function only supports US...
February 9, 2002
and CreateObject() allow COM objects to be invoked on remote servers. The server name, passed to the SERVERNAME attribute, is highly flexible. Values may be IP addresses, DNS names, URL's, server names, or a UNC paths. (Applies to: ColdFusion 3 or later)
February 8, 2002
Some date functions require that date time objects be passed to them, even if a complete date time object is not needed. For example, DaysInMonth(), which returns the numbers of days in a specified month, needs to just know the month and year to perform the calculation, and yet the function takes a...
February 7, 2002
When working with file paths it is often necessary to extract specific portions of the path, for example, just the file name, or just the directory. Instead of performing manual processing to extract these values, you should use the CFML functions GetFileFromPath() and GetDirectoryFromPath() (which...
February 6, 2002
CFML features an extensive array of date functions that you may use within your applications. But use these functions carefully. Some return date time objects, while many others return ordinal values (values relative to a specific starting point). If you are using several of these functions...
February 5, 2002
is usually used to terminate Custom tag processing, but it has another use too. Specify METHOD="loop" to force ColdFusion to reexecute code within a Custom Tag. (Applies to: ColdFusion 4 or later)
February 4, 2002
is used to cache programmatically generated pages that need not always be regenerated from scratch. Pages cached with automatically expire after a specified time (relative or absolute), and pages may also be expired manually using ACTION="FLUSH" when needed. When expiring pages manually you have...
February 3, 2002
returns a list of directory contents when ACTION="LIST". The returned query will contain 5 columns on a Windows machine (NAME, SIZE, TYPE, DATELASTMODIFIED, ATTRIBUTES) and six on a Unix machine (the prior 5 plus MODE). This subtle difference in behavior should be kept in mind when writing portable...
February 2, 2002
If is often necessary to pass flags (TRUE/FLASE values, often as 0 and 1) from page to page. Before using these flags you should check that they are in fact valid boolean values (just to be sure they did not get changed or tampered with). The simplest way to do this is using the IsBoolean()...
February 1, 2002
NumberFormat() is a powerful function, allowing flexible and sophisticated numeric formatting. But for quick and simple number formatting you may want to use one of the shortcut functions like DecimalFormat() which formats numbers with two decimal places and thousands separators, or DollarFormat()...