//下面是输出下载;
header ( "Cache-Control: max-age=0" );
header ( "Content-Description: File Transfer" );
header ( 'Content-disposition: attachment; filename=' . basename ( $filename ) ); // 文件名
header ( "Content-Type: application/zip" ); // zip格式的
header ( "Content-Transfer-Encoding: binary" ); // 告诉浏览器,这是二进制文件
header ( 'Content-Length: ' . filesize ( $filename ) ); // 告诉浏览器,文件大小
ob_clean();
flush();
echo readfile ( $filename );//输出文件;