Sorry, I am writing to a cfm file. I tried escaping the # with ##variable##
and it still throws the same error.

-----Original Message-----
From: John M Bliss [mailto:[email protected]] 
Sent: Thursday, October 21, 2010 11:31 AM
To: cf-talk
Subject: Re: Writing cfml content to an html file


Right.  Also, if you use cffile to write CFML to a file, then the file
you're writing to should be a .cfm file (unless you have your server
configured to pass .htm files to the CF server).

On Thu, Oct 21, 2010 at 9:27 AM, Andy Matthews
<[email protected]>wrote:

>
> You shouldn't have any problems writing CFML code to a page. The error
> you're getting is likely from your hashmarks not being escaped.
>
>
> andy
>
> -----Original Message-----
> From: Rick Sanders [mailto:[email protected]]
> Sent: Thursday, October 21, 2010 9:23 AM
> To: cf-talk
> Subject: Writing cfml content to an html file
>
>
> Hey all,
>
> I'm trying to take some cfml content and write it to an html file using
> cffile. The cfml content has queries etc.... I'm getting all kinds of
> errors. Is there any way I can just get the cffile tag to write exactly
> what
> I want to the file parsing the cfml content?
>
> Error example:
>
> Invalid CFML construct found on line 18 at column 303.
> ColdFusion was looking at the following text:
> #
> The CFML compiler was processing:
> *       A cffile tag beginning on line 1, column 2.
>
> The error occurred in E:\Websites\nscomputers\emailquote.cfm: line 18
> 16 :           </tr>
> 17 : <cfquery name="sys" datasource="nscomputers">
> 18 : SELECT
>
>
S1.SystemID,S1.SessionID,S1.CPU,S1.RAM,S1.RAMqty,S1.MB,S1.HD,S1.HDqty,S1.Tow
>
>
er,S1.Optical,S1.Video,S1.OS,S1.Keyboard,S1.Mouse,S1.Monitor,S1.Printer,S1.S
>
>
peaker,S1.acc1,S1.acc2,S1.acc3,S1.acc4,S1.acc5,S1.acc6,S1.acc7,S1.acc8,S1.Su
> bTotal,S1.CreatedBy FROM dbo.SystemBuilder S1 WHERE
> (S1.SessionID='#cookie.sid#')
> 19 : </cfquery>
>
>
>
>
>
>
>
> 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:338430
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

Reply via email to