标签:
$size=filesize($file);
$file=fopen($file, "r");
ob_start();
header("Content-type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length: $size");
header("Content-Disposition: attachment; filename=$filename");
echo fread($file,$size);
fclose($file);
标签:
原文地址:http://www.cnblogs.com/freelyflying/p/5733959.html