#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    San Diego, CA, USA
    Posts
    8
    Rep Power
    0
    I notice that my downloaded file has an extra new line on the end. This occurs when I use either Method 1 or 2 to download. There are no extra newlines in my download script below. Can anyone tell me why the line is added?

    Thanks!

    <?php
    header("Content-type: application/octet-stream");
    header("Content-Disposition: attachment; filename="$savename"");
    header("Content-Description: PHP3 Generated Data");
    //METHOD ONE
    if (!readfile($file))
    //
    // METHOD TWO
    //$fn=fopen("$file","r"); fpassthru($fn);
    ?>
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2000
    Location
    London/UK
    Posts
    91
    Rep Power
    14
    I've read somewhere that IE is crap when it comes to dealing with headers

    also try changing the MIME type to octetstream (not correct I know) but it may be a KLUDGE

    hth

    Bealers
  4. #3
  5. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    San Diego, CA, USA
    Posts
    8
    Rep Power
    0
    thanks for the suggestion, but it did not seem to fix the problem.

Similar Threads

  1. Pointer problem in opening a file
    By LAKI in forum C Programming
    Replies: 13
    Last Post: February 11th, 2004, 08:27 AM
  2. Pointer problems opening file *formatted*
    By LAKI in forum C Programming
    Replies: 4
    Last Post: February 11th, 2004, 06:06 AM
  3. PHP file upload script trouble
    By casbboy in forum PHP Development
    Replies: 9
    Last Post: February 5th, 2004, 07:42 PM
  4. opening a file from FTP site
    By ffenics in forum FTP Help
    Replies: 13
    Last Post: February 5th, 2004, 10:29 AM
  5. How to Detect that file has been downloaded on client machine
    By ranjit1977 in forum ASP Programming
    Replies: 0
    Last Post: January 29th, 2004, 08:41 AM

IMN logo majestic logo threadwatch logo seochat tools logo