Re: Forced File Downloads

From: Date: Sun, 21 Jan 2007 10:20:01 +0000
Subject: Re: Forced File Downloads
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-247486@lists.php.net to get a copy of this message
# don@teamn2k.com / 2007-01-20 22:51:41 -0800: > I've been having my forced downloads sometimes finish prematurely using > readfile(). I'm downloading a Windows .exe file. > > I've read several posts that have suggested the substitution of a fread/feof > loop to write out the download in smaller chunks. I tried using a function > (readfile_chunked) I found in the user comments on php.net. > > But for some odd reason, every time the downloaded file is one byte larger > than the original file, and it's not being recognized as a valid Windows > file. What value does the one byte you send in excess have, and where is it located, prepended or appended to the file?

« previous php.general (#247486) next »