Read Data from File

Read Data from File:

<?php
$filename = "e:/readdata.txt";
$myfile = fopen($filename, "r") or die("Unable to open file");
$showfile = fread($myfile, filesize($filename));
$showfile = "<br>$showfile<br/>";
$msg = "The file contents are <p>$showfile</p>";
?>
                                                      <?=$msg?>

                                                  

No comments:

Post a Comment