fopen_read file feof

This example shows how to open an file and reads the contents using "feof" founction endl-of-file function.

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>file open read </title>
</head>
<body text="#000080" bgcolor="#F0FAFF">
http://manas6/myphp.test.txt <br>
http://manas8x/tutorials_example/forms/fopen_fgets/test.txt <br>
<?php
echo " The abslute path is : <br/>";
$path= "test.txt";
print $path;
if ($path!=""){
$absolutePath = realpath($path);}
echo "<br>";
$handle = fopen($path, "r");
while (!feof($handle)) {
$buffer = fgets($handle, 1400);
echo $buffer;
}
fclose($handle);
?>
</body>
</html>