时间:2021-07-01 10:21:17 帮助过:4人阅读
$fs = fopen($_finame,'r');
$_fisize = filesize($_finame);
Header("Content-type: application/octet-stream");
Header("Accept-Ranges: bytes");
Header("Accept-Length: ".$_fisize);
Header("Content-Disposition: attachment; filename=".basename($_finame));
$buffer = 512;
while(!feof($fs)){
$_fidata = fread($fs,$buffer);
echo $_fidata;
}
fclose($fs);