Matthew,

When I had my application in CF 5.0 and MX <> needed to be escaped when you were not using CFSCRIPT. That's why I suggested going that route (its also a little cleaner to read since this can get pretty messy really quickly)

Try it in these versions--- you'll get an Just in Time Complilation Error.

In any case, we'll both agree that one needs to escape " and # unless one evaluates a variable value to be used within the new file. We'll also agree that its a pretty intresting way of setting perfernces or allowing administrators to really extend an application.

Jeremy

>Try this:
>
>
>
><cfset a="<cfoutput>123</cfoutput>">
>
><cfoutput>#a#</cfoutput>
>
>
>
>View the page's HTML. You should see the cfoutput tags in there - at least I
>do on 6.1.
>
>
>
>-----Original Message-----
>From: Jeremy Brodie [mailto:[EMAIL PROTECTED]
>Sent: Wednesday, 31 December 2003 8:54 a.m.
>To: CF-Talk
>Subject: Re:cf file write
>
>
>
>Since I suggested using CFscript its my bad. If you were outside of CFSCRIPT
>then you would need to escape <>.
>
>>Are you sure about escaping <>? Never seen that before, and when I
>>experimented with it I just got two of each. The only thing you need to
>>escape is ".
>>
>>
>>
>>-----Original Message-----
>>From: Jeremy Brodie [mailto:[EMAIL PROTECTED]
>>Sent: Wednesday, 31 December 2003 8:07 a.m.
>>To: CF-Talk
>>Subject: Re:cf file write
>>
>>
>>
>>Yes, you can create .cfm files from CFILE=write
>>
>>Here's how it world work
>>1) Move all CF code into a single variable. My perferance would be to use
>>CFscript synatx, since it will force you to use the correct syntax--
>>
>><cfscript>
>>cftext="<<cfoutput>>
>><<cfset var=#evaluate("myvar")#>>
>><<cfoutput>>";
>>// yes, you will need to double pound, double quote and double << every
>time
>>you need a variable or a tag
>></cfscript>
>>
>><CFfile action=""
>>file="e:\_promotrials\#trialname#\trial_include.cfm"
>>output="#cftext#">
>>
>>2) test and use
>>
>>> Can <CFFILE> be used to write and output a cf file (.cfm) not a text (.
>>> txt) file?
>>>
>>> How would I work this?
>>>
>>> I have this down: <CFfile action=""
>>> file="e:\_promotrials\#trialname#\trial_include.cfm"
>>> output="
>>>
>>> It crashes when I insert info from the .cfm file that includes quotes.
>>>
>>>
>>> Roberto O.
>>HWW
>>
>>  _____  
>>
>>
>
>  _____  
>
>
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to