Whatever message this page gives is out now! Go check it out!
FileOpen(filepath, [mode, charset]) |
Parameter | Description |
filepath | An absolute path of an on-disk or in-memory file on the server. |
mode | Action to perform on the file, including the following:
|
charset | The character set of the file. |
<cfscript>
myfile = FileOpen("c:\temp\test1.txt", "read");
</cfscript>
myfile refers to:
<cfdump var="#myfile.filepath#">ram:///filepath |
<h3>FileOpen Example</h3>
<cfscript>
myfile = FileOpen("c:\temp\test1.txt", "read");
while(NOT FileIsEOF(myfile))
{
x = FileReadLine(myfile);
WriteOutput("#x# <br>"); }
FileClose(myfile);
</cfscript>