Ben Forta

Blog

May 31, 2001

Looping Through Queries in

supports FOR, WHILE, and DO WHILE loops - there is no loop to loop through query results. So how can you loop through queries in a block? Use the query.column[row] syntax, replacing query and column with the query and column names, and row with the desired row number. (Applies to: ColdFusion All)

May 30, 2001

Accessing Files on Servers

ColdFusion has two built-in methods for server side file access - and . should be used for all local file system access (including access to files on accessible network drives). should be used to access files on remote servers (assuming FTP access is available on that server). ColdFusion cannot...

May 29, 2001

Ensuring Child Tags Are Invoked Correctly

ColdFusion supports the creation and use of complex Custom Tags involving the use of base tags (or parent tags) and child tags (tags nested within base tags). Obviously, in this type of Custom Tag it is important that tags be called in the correct sequence (and that child tags not be called outside...

May 28, 2001

Combining Error Handling Techniques

is used to trap error conditions, and are used to programmatically respond to error conditions. Is there ever a need for both at once? Actually, there is. is a special form of error template that is called before / handling is invoked. This allows you to implement centralized logging or debugging...

May 27, 2001

A Better

is usually used to provide an alternate error message screen, but that is not all it can do. As of ColdFusion 4.5, supports a new TYPE called EXCEPTION. Using this type you may specify error pages that have access to all CFML tags and functions, without having to use and . (Applies to: ColdFusion...

May 26, 2001

Bytes or Kilobytes

ColdFusion returns file sizes (uploaded using , or listed using or ) in bytes, not in kilobytes. To convert these sizes to the more familiar KB, simply divide them by 1024. (Applies to: ColdFusion All)

May 25, 2001

Preventing Inline Evaluation

The IIf() function is used to perform inline conditional processing, taking an expression to evaluate as the condition, and the expressions to be evaluated upon that evaluation returning true or false. But what if those latter expressions were literal strings to be displayed as is (and not...

May 24, 2001

Tagless If Statements

is used to implement conditional processing, but sometimes having to use sets of tags can break up the flow of an operation, as in this example: . To simplify this type of coding, consider using the IIf() function which essentially is a / implemented in a function (instead of tags). IIf() takes...

May 23, 2001

Too Much Knowledge Is Dangerous

There are lots of folks out there who would love to hack into your site (often to steal content, or just to make your life a misery). Hackers break into hosts by trying to learn as much about the OS and software begin used, the more they can determine about your environment, the easier it is for...

May 22, 2001

Multiple Custom Tag Directories

By default, ColdFusion looks for Custom Tags in the current directory and beneath a directory named CustomTags under the CF root. You may change the location of this directory (for security purposes) or add additional directories (for greater flexibility) by manipulating the...

Page 464 of 489 (4890 posts)