Results 1 to 2 of 2

Thread: overflow error?

  1. #1
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default overflow error?

    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
    PHP Code:
    <p style="width:650px; height:450px; overflow:auto; padding-left:50px;">
    <?php 
    $myFile 
    "questions.txt";
    $fh fopen($myFile'r');
    $theData fread($fh20000000);
    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.
    Code:
    <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>
    Last edited by bluewalrus; 12-04-2008 at 05:42 AM.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •