如何在使用PHP时找出在移动设备上完成下载的时间

时间:2012-08-13 05:30:11

标签: php jquery

我正在使用PHP标头在移动设备中下载JAR文件和APK文件。我可以成功下载文件,但是当下载达到100%时我想显示一个弹出窗口。我该如何实现这一目标?

是否有下载完成事件的回调方法?

header('Content-Type: '.$mime);
header('Content-Length: '.$stat['size']);
header('Connection: close');
header('Content-disposition: attachment; filename='.$file_name);
readfile($path_to_file);

1 个答案:

答案 0 :(得分:0)