Home > Backend Development > PHP Problem > How to solve the problem of decompression error of zip file generated by php

How to solve the problem of decompression error of zip file generated by php

藏色散人
Release: 2023-03-05 07:52:01
Original
3397 people have browsed it

Solution to the decompression error when php generates a zip file: First use ultraedit to view the zip file downloaded from the server; then set the "Content-Length" to a longer value.

How to solve the problem of decompression error of zip file generated by php

Recommended: "PHP Video Tutorial"

Specific questions:

Me Compress the folder into a zip. After compression, it needs to be downloaded to the local machine. It is normal to decompress the zip file on the server. However, if the zip file downloaded to the local machine contains pictures or PDF files, it cannot be decompressed, saying that the file is damaged. This is What should I do?

Solution:

Use ultraedit to check the server and the downloaded zip file. 00 00 00 is missing at the end. Change the Content-Length It would be better to make it a little longer.

The above is the detailed content of How to solve the problem of decompression error of zip file generated by php. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
zip
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template