Reads a line from the file.
The line of the file.
FileReadLine(fileObj)
FileClose, FileIsEOF, FileRead, FileWrite
ColdFusion 8: Added this function.
|
Parameter |
Description |
|---|---|
| fileObj |
The file object |
The following example opens a file, reads each line, outputs each line, and then closes the file.
<h3>FileReadLIne Example</h3>
<cfscript>
myfile = FileOpen("c:\ColdFusionScorpio\wwwroot\test1.txt", "read");
while(NOT FileisEOF(myfile))
{
x = FileReadLine(myfile); // read line
WriteOutput("#x#");
}
FileClose(myfile);
</cfscript