<?php
$file=fopen('文件地址',"r");
header("Content-Type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length: ".filesize('文件地址'));
header("Content-Disposition: attachment; filename=文件名称");
echo fread($file,filesize('文件地址'));
fclose($file);
?>
$file=fopen('文件地址',"r");
header("Content-Type: application/octet-stream");
header("Accept-Ranges: bytes");
header("Accept-Length: ".filesize('文件地址'));
header("Content-Disposition: attachment; filename=文件名称");
echo fread($file,filesize('文件地址'));
fclose($file);
?>