Thanks Jack. Works fine now.
Ketan Patel
-----Original Message-----
From: Jack Dalaa [mailto:[EMAIL PROTECTED]
Sent: Monday, December 22, 2003 9:58 AM
To: CF-Talk
Subject: Re:write a file using CFFILE with CF tags in it

  Doh, minor correction, you need double pound signs or the myquery.id will
have to be resolved, so use this instead:

  <cfset WhatToWrite = '<cfset id =
##myquery.id##>#CHR(10)##CHR(13)#<cfinclude template="../mypage.cfm">'>

  <cffile action="" mode="777" file="#Trim(Lcase(myquery.name))#.cfm"
output="#WhatToWrite#" addnewline="no">

  .. That should work.

  Jack

  > Use:
  >
  > <cfset WhatToWrite ='<cfset id = "#myquery.
  > id#">#CHR(10)##CHR(13)#<cfinclude template="../mypage.cfm">'>
  >
  > <cffile action="" mode="777" file="#Trim(Lcase(myquery.name))#.
  > cfm" output="#WhatToWrite#" addnewline="no">
  >
  > Make sure there's no wrapping or line breaks in the cfset.
  >
  >
  > Jack
  >
  > >Hi,
  > >I want to write a file with following 2 cf tags in it
  > >
  > ><cfset id =#myquery.id#>
  > ><cfinclude template="../mypage.cfm">
  > >
  > ><cffile action="" mode="777" file="#Trim(Lcase(myquery.name))#.
  > cfm" >output="
  > >
  > ><cfset id =#myquery.id#>
  > ><cfinclude template="../mypage.cfm">
  > >
  > >" addnewline="no">
  > >
  > >I am getting an error.
  > >
  > >
  > >
  > >
  > >Ketan Patel
  >
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to