PHP download blocks rest of requests

后端 未结 1 977
你的背包
你的背包 2021-01-14 14:04

I am downloading files from my server using a very simple script:

header(\'Content-Description: File Transfer\');
header(\'Content-Type: application/octet-st         


        
相关标签:
1条回答
  • 2021-01-14 14:43

    This is because you are using PHP sessions, and while a session for one user is opened in one request, the same session cannot be opened in an other request.

    Do a session_write_close() before readfile().

    0 讨论(0)
提交回复
热议问题