PDA

View Full Version : overflow error?



bluewalrus
12-04-2008, 05:36 AM
I have this code but its only displaying the first 300 pixels then its showing repetitive lines for the rest but looking at the code on the page (html) all the text from the text file is there. At the <hr /> it looks like its not reading any further. There are only 4 of them and on the page there are over 6. The page can be viewed here: http://www.travelinchucks.com/qa.php

<p style="width:650px; height:450px; overflow:auto; padding-left:50px;">
<?php
$myFile = "questions.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, 20000000);
fclose($fh);
$notesout = str_replace("\r", "<br/>", $theData); echo $notesout;
?>
</p>

Thanks for any ideas you have. Maybe its my browser?

Ok so another clue? This passes w3c standards but displays all lines as oppesed to the code above which gives 6 errors but displays until the hr.

<div style="width:650px; height:450px; overflow:auto; padding-left:50px;">
<?php
$myFile = "questions.txt";
$fh = fopen($myFile, 'r');
$theData = fread($fh, 20000000);
fclose($fh);
$notesout = str_replace("\r", "<br/>", $theData); echo $notesout;
?>
</div>

bluewalrus
12-04-2008, 06:27 AM
I fixed it I had the php writting the html wrong. I've still yet to figure out the resolved button that everyone always talks about.