Use PHP to decompress and convert uploaded ZIP files_PHP tutorial

WBOY
Release: 2016-07-13 17:30:27
Original
908 people have browsed it

Use PHP to decompress uploaded ZIP files (transfer)
caoli published on 2001-2-20 10:48:20 PHP Programming ← Return to the page

I accidentally discovered this while browsing the web not long ago The homepage bus of www.chinaren.com can automatically decompress the uploaded ZIP file, which is very interesting. What interests me even more is that its function is using PHP. Considering that I also know some PHP, I decided to Try it.

After some searching, I only found a ZLIB function in the PHP function library that has something to do with compression. But what disappointed me was that it failed to decode ZIP files (hey... I had to Don’t say I don’t have perseverance if I give up!) But as the saying goes: Hard work pays off! In the end, I found a solution, which is to implement this function through PHP's program execution function, because there are so many things that can decode ZIP files (if you don't believe it, you can look for it where you can download the software) , I guarantee you will not be disappointed, my words are not wrong).

The following is the original file of the program:

#upload.php




If it is a *.ZIP file, it will Automatically decompressed














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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!