Posted By

mukeshdak on 07/25/11


file text read mukeshdak

Versions (?)

Read Text File

 / Published in: PHP


Use this code to read a text file in PHP

  1. // Using the code below a text file can be read in PHP
  3. $myFile = "config/navigation.txt";
  4. $fh = fopen($myFile, 'r');
  5. $theData = fread($fh, filesize($myFile));
  6. fclose($fh);
  7. echo $theData;

Report this snippet  

You need to login to post a comment.