[SOLVED] Reading from a text file ~ displays 2 times
Posted: Tue Jan 25, 2005 12:28 pm
Code: Select all
<?php
$listFile = "latest.txt";
if (!($fp = fopen($listFile, "r")))
exit("Unable to open the input file, $listFile.");
$buffer = fread($fp, filesize($listFile));
print "$buffer<br>\n";
fclose($fp);
?>
<html>
<body bgcolor="4D5E6B">
<?php echo $buffer; ?>
</body>
</html>