Reading from a File : File Read : File Directory PHP Source Code


PHP Source Code » File Directory » File Read »

 

Reading from a File




 <?php
  $myfile = "./test.txt";

  $openfile = fopen ($myfile, "r"or die ("Couldn't open the file");
  $file_size=filesize($myfile);

  $file_content = fread ($openfile, $file_size);
  fclose ($openfile);

  echo $file_content;
  ?>
           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» File Read