There are two folders on the server to be downloaded to the user, there are a lot of video capacity is very large (10G), I want to first use my own ziparchive extension to compress the folder into. zip format and then let the user download, the problem is that the compression time is very long, the page is stuck there, and ultimately cannot survive. zip file (can generate. zip), set_time_limit (0); Ini_set (' Max_execution_time ', 5000); no effect.
Then try ZIPstream and pclzip These two classes still do not solve the problem, what should I do, or have other methods?
Forgot to say that the customer machine is the Win7 system
Reply content:
There are two folders on the server to be downloaded to the user, there are a lot of video capacity is very large (10G), I want to first use my own ziparchive extension to compress the folder into. zip format and then let the user download, the problem is that the compression time is very long, the page is stuck there, and ultimately cannot survive. zip file (can generate. zip), set_time_limit (0); Ini_set (' Max_execution_time ', 5000); no effect.
Then try ZIPstream and pclzip These two classes still do not solve the problem, what should I do, or have other methods?
Forgot to say that the customer machine is the Win7 system
️️️ read the comments.
It's not a time to spend. Even if a user can barely do, the number of users is also a dead.
Such a big data simply cannot be considered compressed into a full zip at the scene.
Each video must be split into separate zip, and then the zip file header is constructed based on the user's request, followed by the zip-up data for each file. Or maybe use tgz to do it (a bit simpler than zip).
It is also recommended to detail the requirements-the number of users, video usage, whether to allow users to download some files (or only to allow the whole download), whether there is the characteristics of incremental synchronization.
10G file, I think this is not a simple problem that can be solved by PHP.