Using fgets() and feof() Functions : File Read : File Directory PHP Source Code


PHP Source Code » File Directory » File Read »

 

Using fgets() and feof() Functions



<?php
  $myfile = "./test.txt";
  $openfile = fopen ($myfile, "r"or die ("Couldn't open the file");

  while (!feof ($openfile)) {
     $lines= fgets($openfile, 1024);
     echo "$lines""n";
  }
?>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» File Read