Trainings

Wednesday, August 5, 2009

Coldfusion Daily Dose


cfdump append value in file
------------------------------
Today i found a very useful feature of cfdump , one of my favourite tag in coldfusion .
when you use the output="file path" attribute, cfdump writes the var attribute value to the file.
it is very useful when we are debugging an application.
specially when we want to dump an variable/object whose value changed in a loop.
it appends the value if file already exists.
<cfset ls = "prashant,amit,rahul,vivek">
<cfloop list="#ls#" index="name">
<cfdump var="#name#" output="#ExpandPath('./temp.html')#">
</cfloop>