Using this script, a text file can be read and can be displayed on a php page
<?php
$filename = "dak.txt";
// set file to read
$fh = fopen ($filename, "r") or die("Could not open file");
// open file
while (!feof($fh)) {
// read file
$data = fgets($fh);
echo "<br>".$data;
}
// close file
fclose ($fh);
echo "<p>Contents of file ".$filename." are are shown above ";
?>