This content has been marked as final.
Show 1 reply
-
1. Re: cfsavecontent and cffile
-==cfSearching==- Sep 26, 2008 1:35 PM (in response to Dan Bracuk)Dan Bracuk wrote:
> When I opened the file to see how it turned out, I got unexpected results
Probably whitespace where you did not expect it? I observed those results too. But then I remembered cfsavecontent captures whitespace. So the placement of tags and newlines matters. Something like this works correctly. Though I usually use the old concatenated string method myself.
<cfsavecontent variable="output"><cfoutput query="q">#Col1#,#Col2#
</cfoutput>
</cfsavecontent>
<cffile action="write" file="#ExpandPath('./test.txt')#" output="#trim(output)#">

