Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
shaunna_shelton #1
Using CFFILE to write ColdFusion files
I want to use CFFILE to write out ColdFusion files instead of just text files.
I can't find this in the documentation anywhere.
I can get it to create a .cfm file and write to it, as long as I don't have
any # signs. Which of course does me no good.
I'm wondering if there is some way to get it to not evaluate the # signs when
I'm setting the output variable, so it will actually write them to the
ColdFusion file.
Here's what I have:
<html>
<head>
<title>Write ColdFusion File</title>
</head>
<body>
<cfset thisoutput="<cfquery datasource=MyDatasource name=GetData>Select
PageTitle from tblContent</cfquery><cfoutput
query=GetData>#GetData.PageTitle#</cfoutput>">
<cffile action="write" file="C:\inetpub\wwwroot\MyTestFile.cfm"
output="#thisoutput#">
</body>
</html>
shaunna_shelton Guest
-
cffile write no longer working
I am using cffile write on cfmx7 to create lots of html static files. Since today it is not working anymore. I tried to restart the coldfusion... -
How to use CFFILE to rename files
I tired the following and got error, please help! All I need is appending all the files within FolderA with "Version1_" in front of the file name... -
cffile write
Hi all, I am trying to output to a txt file using cffile write. Problem is I output a query with a header and run a subquery inside of each... -
cffile action=write ... does nothing
Hi! I am trying to write to a file and nothing happend... Not even an error message! Do I have to setup someting special on the server? Here is my... -
CFFile won't delete files
I have a list of articles in my knowledgebase some of which are totally web based and others are DOC or PDF files.... The admin is allowed to... -
OldCFer #2
Re: Using CFFILE to write ColdFusion files
Just double up the pound signs:
cfoutput query=GetData>##GetData.PageTitle##</cfoutput>">
After you write it to a file you will have to cfinclude it.
OldCFer Guest



Reply With Quote

