Using PHP to decompress the uploaded ZIP file (for conversion) caoli was published in 2001-2-2010: 48: 20PHP programming forum not long ago when I browsed the webpage, I accidentally discovered that the home page of www.chinaren.com was able to automatically decompress the uploaded ZIP file. I was very interested in SyntaxHighli.
Decompress the uploaded ZIP file using PHP (for conversion)
Caoli was published on 10:48:20 PHP Programming Forum return page
Not long ago, when I browsed the webpage, I accidentally found that the home page bus www.chinaren.com was able to automatically decompress the uploaded ZIP file, more interesting to me is that its function is to use PHP. considering that I will also use some PHP, I decided to try it.
After some searching, I found only a ZLIB function in the PHP function library, which has a relationship with compression, but I was disappointed that he could not solve the ZIP file (ah .... I had to give up. don't say I have no perseverance !!!). But as the saying goes: Do it mean you have to pay for it! Finally, let me find the solution, that is, to implement this function through the PHP program execution function, because there are too many things that can solve ZIP files now (if you do not believe it, you can go to the place where you have downloaded the software to find it, so you will not be disappointed, and I will not be wrong ).
The following is the original file of the program:
# Upload. php
If the file is *. ZIP, it will be automatically decompressed.
// Upsave. php
// Save the uploaded file
$ Filename = "$ MyFile_name ";
Copy ($ MyFile, "$ filename ");
Unlink ($ MyFile );
// Determine whether the file is a ZIP file
$ Expand_name = explode (".", $ filename );