How to detect when a user has successfully finished downloading a file in php

后端 未结 2 1730
我寻月下人不归
我寻月下人不归 2020-12-01 15:20

I\'ve got a php page which handles requets for file downloads. I need to be able to detect when a file has been downloaded successfully. How can this be done? Perhaps there\

2条回答
  •  隐瞒了意图╮
    2020-12-01 15:49

    What Treb said, but I should add that you can check if the client is still listening during download with connection_status().

    Don't forget to flush() after you've written data to the client, it helps in detecting if the connection is still up.

提交回复
热议问题