On 11/30/00, j p penned:
>Example:
>Section A - is the actual page code I want to generate, with all character
>that cause a problem replaces with something else. This is needed beacuse a
><, >, or " inside a CFSET (or inside teh CFFILE) will cause the tag to
>fail.
There should be no problem using < inside of quotes in the cffile
output variable or inside of quotes inside of cfset. The only things
that should give you problems are quotes and #.
For instance this code:
<cfset PageCode ="
<html>">
<body bgcolor="#variables.myBGColor#">
some page text
`variables.SomeVar`
</body>
</html>
">
I would write like this: Paste this into a template and change the
path of cffile and watch it work. :)
<cfset variables.myBGColor = "##FFFFFF">
<cfset variables.somevar = "My Text">
<cfset PageCode = "<html>" & chr(10)
& "<body bgcolor=" & chr(34) & variables.myBGColor & chr(34) & ">" &
chr(10) & chr(10)
& variables.SomeVar & chr(10) & chr(10)
& "</body>" & chr(10)
& "</html>">
<cffile action="WRITE"
file= "C:\inetpub\wwwroot\testing\Page.cfm"
addnewline="No"
output="#Variables.PageCode#">
--
Bud Schneehagen - Tropical Web Creations
_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
ColdFusion Solutions / eCommerce Development
[EMAIL PROTECTED]
http://www.twcreations.com/
954.721.3452
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists