Here you are how to download multiple files…
The tricks is rendering many iframe in same page.
Every frame has different source that force download different files
<?php
for($i = 0; $i<5; $i++){
echo '<iframe src="https://stackoverflow.com/questions/16390601/test_multiple_downfile.php?text=".$i."">/iframe>';
}
?>
test_multiple_downfile.php content is this:
$out = $_GET['text'];
header("Content-Type: plain/text");
header("Content-Disposition: Attachment; filename=testfile_".$out.".txt");
header("Pragma: no-cache");
echo "$out";