Reading a File with fread() : File Read : File Directory PHP Source Code


PHP Source Code » File Directory » File Read »

 

Reading a File with fread()



<html>
<head>
<title>Reading a file with fread()</title>
</head>
<body>
<?php
$filename = "test.txt";
$fp = fopen$filename, "r" or die("Couldn't open $filename");
while ! feof$fp ) ) {
   $chunk = fread$fp, 16 );
   print "$chunk<br>";
}
?>
</body>
</html>

           
       



HTML code for linking to this page:

Follow Navioo On Twitter

PHP Source Code

 Navioo File Directory
» File Read