Workaround for Breakpoint Continuation

Source: Internet
Author: User
Breakpoint Continuation
What kind of good master to help tell how to determine whether a file is a breakpoint to continue the file, to determine if the file name exists as if it is not reliable. What if the file name is uploaded by the client, but the file is different??? Is there a better way?? Help write down the If statement okay, I'm very good, thank you.
------Solution--------------------
This variable $_server[' http_range ' gets the RANGE of the file requested by the user, and then the program controls the output of the file. For example, the first time a file is requested from 0 to 999 bytes, the second request 1000 to 1999 bytes, and so on, each request 1000 bytes of content, and then the program through the Fseek function to obtain the corresponding file location, and then output.
PHP implementation file Download breakpoint continuation
------Solution--------------------
You can't judge by your own
But you can return a unique identification flag when you first receive the uploaded fragment, allowing the continuation client to send back

------Solution--------------------
File name, file size is not the same, you can get the file name, file size, type as a condition,
by $_server[' Http-range '] to obtain the client request for continued transmission as a mark.
  • 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.