我已经尝试了所有的标题.有和没有内容长度.
问题是下载量在中途徘徊.但只是大部分时间.
有时它工作得很好.
服务器资源使用是微不足道的.所有配置文件都没问题.它不会运行PHP脚本.
谁看过这个吗?这不是我的错吗?有时为什么?
$file = "http://domain.com/files/".$item_number.".mov";
header( 'Pragma: no-cache' );
header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
header( 'Content-Description: File Download' );
header( 'Content-Type: application/force-download');
//header ('Content-Type: video/quicktime');//doesnt seem to download at all here
header( 'Content-Length: '.filesize( $file ) );
header( 'Content-Disposition: attachment; filename="'.basename( $file ).'"' );
header( 'Content-Transfer-Encoding: binary' );
readfile( $file );
exit();
Run Code Online (Sandbox Code Playgroud)
谢谢,对不起,这是我的第一次.