小编sle*_*box的帖子

如何检测用户何时成功完成在php中下载文件

我有一个php页面来处理文件下载的请求.我需要能够检测文件何时成功下载.如何才能做到这一点?也许有一些方法可以检测到这个客户端,然后向服务器发送确认信息.

谢谢.

编辑:通过句柄,我的意思是该页面正在做这样的事情:

$file = '/var/www/html/file-to-download.xyz';
  header('Content-Type: application/octet-stream');
  header('Content-Length: ' . filesize($file));
  header('Content-Disposition: attachment; filename=' . basename($file));
  readfile($file);
Run Code Online (Sandbox Code Playgroud)

php attachment http-headers

9
推荐指数
1
解决办法
7452
查看次数

标签 统计

attachment ×1

http-headers ×1

php ×1