我見過的documentation for PHP readfile
PHP多文件下載
<?php
$file = 'monkey.gif';
if (file_exists($file)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename='.basename($file));
header('Content-Transfer-Encoding: binary');
header('Expires: 0');
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
header('Pragma: public');
header('Content-Length: ' . filesize($file));
ob_clean();
flush();
readfile($file);
exit;
}
?>
這個例子你怎麼能使它所以它下載多個文件說monkey.gif
和girraffe.jpg
最好不ZIP
文件...
一個HTTP請求,一個文件... – 2010-09-07 22:11:08
見過這樣一個下載地方? – 2010-09-07 22:12:03
相關/可能重複:[在一個HTTP請求中下載多個文件](http://stackoverflow.com/questions/2332329/download-multiple-files-in-one-http-request) – hakre 2012-02-08 01:10:46