Hi,
I'm writing a few scripts that allows users to download files,
some around 45MB+.
The files are stored outside the webroot, for security reasons,
so when the user clicks on the link, this called my downloadFile.php script, this script accesses the requested files, using the path relative to the top of the actual file system, then outputs the correct headers for the mimetype and file length (to assist in the download box status time), for small files, then this is really quick and works great, yet for files from say 10MB or more, it takes around a minute before the download box even pops up.
I've tried using readfile and fread, to access the files, yet both seem to take the same amount of time, it would seem like they are getting buffered, or maybe read into memory, before they are allowed to be downloaded, basically I'm trying to reproduce the same effect of having the file in the webroot and creating a simple href to the actual file (using this method, would show the location of the files, this is what I'm trying to avoid).
Can anyone advise me on what I may be doing wrong, code examples can be supplied if required.
Cheers in advance
Mark
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php