|
|
MarieLaro wrote:
> To do so, I need to use <br> to change line, but the <br> appears in my file.
Cfsavecontent should preserve line breaks. This produced a text file with
four lines for me.
<cfset q = queryNew("")>
<cfset queryAddColumn(q, "Col1", listToArray("test,test,test,test"))>
<cfset queryAddColumn(q, "Col2", listToArray("this,that,this,that"))>
<cfsavecontent variable="output">
<cfoutput query="q">#Col1#,#Col2#
</cfoutput>
</cfsavecontent>
<cffile action="write" file="#ExpandPath('./test.txt')#"
output="#trim(output)#">
If needed use your o/s new line character, rather than the html line break.
(ie chr(13)&char(10), etc...)
|
|