//缓冲区
ob_end_clean();
ob_start();
$file = file_get_contents($url);//$url ---http或者httpsl链接或者本地地址
header("Content-type:application/octet-stream");
$filename = pathinfo($url,PATHINFO_BASENAME);
header("Content-Disposition:attachment;filename=" . $filename);
header("Accept-ranges:bytes");
ob_end_flush();
exit($file);
如有疑问可联系Q 1694084708…