With PHP, it's not possible. You can only serve one file per request. However, you can invoke the browser to download multiple files by using a little JavaScript:
var files = ['fileone.zip', 'filetwo.zip'];
for (var i = 0; i < files.length; i++){
window.open(files[i], 'Download file');
}
It's really pretty nasty though. I'd just go with a zip.
PS. If you want to download html files with this method, you need to send out the Content-Disposition
header for each file, to ensure the document doesn't just get rendered in the popup window spawned by window.open
:
header('Content-Disposition: attachment; filename="todownload.html"');