Php reads zip files (delete files, Extract files, and add files) instances,
<? Php/* php extracts files from a zip compressed file */$ zip = new ZipArchive; if ($ zip-> open('jqueryfive-screen scrolling corner code .zip ') = TRUE) {// The ANSI encoded format of the Chinese file name $ zip-> extraceid ('foldername '); // extract all files // $ zip-> extraceid ('/my/destination/dir/', array('pear_item.gif ', 'testfromfile. php '); // extract some files $ zip-> close (); echo' OK ';} else {echo 'failed';}?> <? Php/* The http://www.manongjc.com/article/1341.htmlphp removes files from a zip file */$ zip = new ZipArchive; if ($ zip-> open('ajaxupload.zip ') = TRUE) {$ zip-> deleteName('file.txt '); // delete the file $ zip-> deleteName ('testdir/'); // Delete the folder $ zip-> close (); echo 'OK';} else {echo 'failed';}?> <? Php/* http://www.manongjc.com/article/1342.htmlphp Add a file to a zip file */$ zip = new ZipArchive; if ($ zip-> open('ajaxupload.zip ') = TRUE) {// ajaxupload.zip is an existing zip file. Pay attention to the encoding of Chinese file names. $ zip-> addFile ('33. xml '); // Add a new file $ zip-> close (); echo' OK ';} else {echo 'failed';}?>