When using readfile() -- using PHP on Apache -- is the file immediately read into Apache\'s output buffer and the PHP script execution completed, or does the PHP script exec
Under Apache, there is a nice elgant solution not involving php at all:
Just place an .htaccess config file into the folder containing the files to be offered for download with the following contents:
ForceType applicaton/octet-stream
This tells the Apache to offer all files in this folder (and all its subfolders) for download, instead of directly displaying them in the browser.