PHP Classes

File: example.php

Recommend this page to a friend!
  Classes of Hamid Ghorashi  >  Read Text Files  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Example
Class: Read Text Files
Read text files line by line
Author: By
Last change: the required file was updated.
Date: 10 years ago
Size: 308 bytes


Class file image Download


$filename = "testfile.txt";
$sf = new TextFileReader($filename);
$sf->seekLine(1); // Go to line 1
while (($val = $sf->readLine())!=NULL)
"Total number of lines: ".$sf->countLines();

For more information send a message to info at phpclasses dot org.