Switch to full style
:read: Start PHP with us. Includes topics to help you in php
Post a reply

Reading the all file in php

Sun Oct 26, 2008 9:17 pm

Code:
<?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;
  
?>




Post a reply
  Related Posts  to : Reading the all file in php
 Multithreaded File Reading     -  
 Reading file with integers     -  
 Reading and Writing To text file     -  
 Reading selected data from a source file     -  
 Reading a File Line by Line in php     -  
 Encrypt/Decrypt a file from source file to target file.     -  
 Reading a Specific Character in php     -  
 Java Object Reading     -  
 Reading email in Python     -  
 help reading greyscaled image !     -  

Topic Tags

PHP Files and I/O