Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- downloading a big .exe fails
July 10, 2008, 7:00 pm
rate this thread
I have a restricted download I want to set up. It's about 19 megs.
It downloads fine, but it mysteriously adds 2 extra bytes to the
file. If I grab the file directly via ftp, it's fine, so I know the
file is good. I don't want to put the download in a public place
because I need to track who is downloading when. Here's the code:
$fp = fopen($file, "rb");
header('Content-Disposition: attachment; filename="demo-
//readfile($file); //have tried this too,
Any ideas why this doesn't work and how to fix it?
I read somewhere else that http compression may be the culprit, but I
don't know if it's possible to turn off compression in the code
Thanks for any help,
Re: downloading a big .exe fails
In reply to Your message dated Thursday, July 10, 2008, 23:00:42,
I'm sure it is not your code, but the file where you have it placed.
Check it for any additional line breaks. Or better, remove anything before
"<?php" or after "?>", even linefeeds.
And I think that "header('Content-Encoding: none');" is worthless.