On my site www.rupertbj.co.uk, in the section called the red room, when people add their comments all is fine unless they press <enter> whilst typing their message. This causes the reading of the file to stop at this position, although new entries will still be added to the file.
I use the following PHP to read the file:
<?php
$filename = "gossip.txt";
$fp = fopen( $filename, "r" ) or die("Couldn't open $filename");
$line = fgets( $fp, 2048 );
print "$line<br>";
fclose( $fp );
?>
Where have i gone wrong?
Many thanks in advance for your input!
Rupert