转载地址:http://www.phpweblog.net/phpbaby/archive/2012/07/10/7709.html
$filePath = Yii::$service->image->GetZipDir('/4/5c/45clz1y4cvbnw23tp05i1566131514.zip');
$file_fullpath = $filePath;
header("Content-Type: application/octet-stream");
header('Content-Disposition: attachment; filename="addons.zip"');//文件描述,页面下载用的文件名,可以实现用不同的文件名下载同一个文件
$data = fopen($file_fullpath, 'rb');
while (!feof($data)) {
echo @fread($data, 8192);
flush();
ob_flush();
}
fclose($data);