[PHP]<?php
$handle = fopen("welcome. txt", "r");
if ($handle) {
while (!feof($handle) ) {
$buffer = fgets($handle);
echo $buffer;
echo "<br>";
}
fclose($handle) ;
}
?>
[/PHP]
this is working as needed for me but i am not getting how it works.. i know tht fgets gets the string of length specified .i am not able to know here how it goes to next line automatically by itself .can any one please explain this to me plzz...
Thanks,
Pradeep
$handle = fopen("welcome. txt", "r");
if ($handle) {
while (!feof($handle) ) {
$buffer = fgets($handle);
echo $buffer;
echo "<br>";
}
fclose($handle) ;
}
?>
[/PHP]
this is working as needed for me but i am not getting how it works.. i know tht fgets gets the string of length specified .i am not able to know here how it goes to next line automatically by itself .can any one please explain this to me plzz...
Thanks,
Pradeep
Comment