我见过的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