• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Outputting a CFML page with cffile

Explorer ,
Feb 08, 2009 Feb 08, 2009

Copy link to clipboard

Copied

I want to create a cfml page, how can I create it with CFFILE, if I put CFML in the output of cffile I get an error.

<cffile file="#ExpandPath("./upload3.cfm")#"
action="write"
output="<cffile action="upload" filefield="filedata">"
destination="#ExpandPath('./uploadedFiles')#"
accept="application/octet-stream"/>/>
TOPICS
Advanced techniques

Views

223

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 10, 2009 Feb 10, 2009

Copy link to clipboard

Copied

LATEST
You can't use cffile inside a cffile. Try this...


<CFSET TEMPVAR = "
<HTML>
<TITLE></TITLE>
<HEAD>
</HEAD>
<BODY>
Your ColdFusion Code
</BODY>
</HTML>
">

<CFFILE action="write" file="#GetDirectoryFromPath(expandpath("*.*"))#/NameofFile.cfm" output="#TEMPVAR#">

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation