PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
Moderator: General Moderators
worm5252
Forum Newbie
Posts: 5 Joined: Mon Jan 24, 2005 12:55 pm
Post
by worm5252 » 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>
This is displaying the contents of my text files 2 times, I only want it to display 1 time? any ideas?
JAM
DevNet Resident
Posts: 2101 Joined: Fri Aug 08, 2003 6:53 pm
Location: Sweden
Contact:
Post
by JAM » Tue Jan 25, 2005 12:32 pm
Either remove
...or...
Preferably the first.
worm5252
Forum Newbie
Posts: 5 Joined: Mon Jan 24, 2005 12:55 pm
Post
by worm5252 » Tue Jan 25, 2005 12:38 pm
That was it, thanks man, I didn't even notice that