In the PHP function library only found a zlib function also with compression a little relationship, but I was disappointed that he did not solve the zip file (eh ....) had to give up, we do not say I have no perseverance!!! )。 But as the saying goes: Kung fu is not a conscientious!
In the PHP function library only found a zlib function also with compression a little relationship, but I was disappointed that he did not solve the zip file (eh ....) had to give up, we do not say I have no perseverance!!! )。 But as the saying goes: Kung fu is not a conscientious! Finally let me find the solution, is through the PHP program execution function to achieve this function, because now can solve the zip file is too much (if you do not believe, you can download the software where to look for, categorization malleability you will not be disappointed, I will not be wrong).
Here is the original file for the program:
#upload. PHP Tutorials
If it is *. The zip file will be automatically decompressed
|
|
upsave.php
Save the uploaded file
$filename = "$MyFile _name";
Copy ($MyFile, "$filename");
Unlink ($MyFile);
Determine if it is a zip file
$expand _name=explode (".", $filename);
if ($expand _name[1] = = "Zip" or $expand _name[1] = = "Zip")
{
$str = "Pkunzip.exe-e $filename";
EXEC ($STR);
Unlink ($filename);
}
?>
The above program I have tested, as long as the server can be put on, but the directory to have write permissions. There is also a pkunzip.exe file to be placed in the directory, the file has been placed in the compressed package.
http://www.bkjia.com/PHPjc/444932.html www.bkjia.com true http://www.bkjia.com/PHPjc/444932.html techarticle in the PHP function library only found a zlib function also with compression a little relationship, but I was disappointed that he did not solve the zip file (eh ....) had to give up, we do not say I have no perseverance ah ...