download php is always damaged

前端 未结 1 939
你的背包
你的背包 2021-01-29 09:41

I have a download script written in PHP. My view file script links to the ids and then selects all the data that matches the ID.

The data is then used to download the ph

相关标签:
1条回答
  • 2021-01-29 10:01

    This happens because PHP send some information after you echo the data, the solution to this is to stop processing right after you echoed the data, for this add exit(); right after echo $data.

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