How to solve the problem of downloading PHP super-large files and resuming downloading at breakpoints
Editor to share with you how to solve the problem of downloading PHP super-large files and downloading broken points. I believe most people don't know much about it, so share this article for your reference. I hope you will get a lot after reading this article. Let's learn about it together.
Recently, there was a problem of php memory overflow when exporting, the reason is that the temporary file generated by reading when downloading is too large, PHP memory can not hold, as soon as I thought of changing the PHP memory limit, but this is only a delaying tactic, so I thought of another way is to read the file in stages and download it.
Here is the source code: