PHP File Packaging compression download

Source: Internet
Author: User
Tags ziparchive
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.

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.