STEP-1 : Open notepad and paste data.
Hello.Txt
------------------------------------------------------------------------------------------
Hello, I am <b> HELLO.TXT </b> n present in d drive of window computer.</br>
Thanks PHP for acknowledge me.</br>
Total no. of character
------------------------------------------------------------------------------------------
STEP-2 : Again open notepad and save below code with name of
'FileHandlingCheckEndOfFile.PHP'
*****************************************************************************************
<?php
$myfile = fopen("d:\hello.txt", "r") or die("Unable to open file!");
// Output one line until end-of-file
while(!feof($myfile)) {
echo fgets($myfile) . "<br>";
}
fclose($myfile);
?>
*********************************************************************************************
No comments:
Post a Comment