Nathan,
The variable is not in the file scope. You just call it as #message#.
The CFFILE scope is used when you do a CFFILE ACTION="upload". It returns a
list of parameters about the file.
The file scope has also been deprecated, you should use CFFILE. when the
situation calls for it.

Hope this helps

Scott Cavanaugh 
Software Developer 
Online Operations 
Salem Communications


-----Original Message-----
From: Nathan Chen [mailto:[EMAIL PROTECTED]]
Sent: Monday, September 24, 2001 4:13 PM
To: CF-Talk
Subject: <cffile action="read"...>


Hi, Everyone,

I am having a  problem with <cffile action="read"...> tag trying to read
a text file and display the file content.  I basically copied the syntax
from CFML Language Reference book as follow:
<cffile action="read" file="c:\temp\myfile.txt" variable="message">

When I did <cfoutput>#file.message#</cfoutput>, I got
"Error resolving parameter FILE.MESSAGE
 Before you can access any file status variables you must execute at
least one CFFILE tag."

I put <cffile...> and <cfoutput> in the same page.  I thought I already
executed the tag.  Does anyone have any idea?   I am using CF 4.5.
Thanks.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Get the mailserver that powers this list at http://www.coolfusion.com
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to