Example of php zip extraction class pclzip. PclZip is a powerful PHP class for compressing and decompressing zip files, this article mainly introduces how to use PclZip. PclZip is a very powerful compressed and decompressed zip file. PclZip is a powerful PHP class for compressing and extracting zip files, this article mainly introduces how to use PclZip.
PclZip is a powerful PHP class for compressing and decompressing zip files. the PclZip library can compress and decompress Zip files (WinZip and PKZIP ); this type of files can be processed, including generating compressed files, listing compressed files, and extracting files. It is simple, easy to use, and powerful. Recently, I was developing my Wordpress plug-in ShareLink. during this process, I found the PHP class of the zip file operated by PclZip, which I have to recommend. Another reason for the recommendation is that the source code of the PHP function allows me to find the loose usage of a PHP function parameter. The following is an example. Use the following code to generate a zip file: <? Phpinclude_once ('pclzip. lib. php '); $ archive = new PclZip('archive.zip'); $ v_list = $ archive-> create('file.txt, data/text.txt, folder '); if ($ v_list = 0) {die ("Error :". $ archive-> errorInfo (true);}?> Usage 2: The code is as follows: <? Phpinclude_once ('pclzip. lib. php '); $ archive = new PclZip('archive.zip'); $ v_list = $ archive-> create ('data/file.txt, data/text.txt ', PCLZIP_OPT_REMOVE_PATH, 'data', PCLZIP_OPT_ADD_PATH, 'install'); if ($ v_list = 0) {die ("Error :". $ archive-> errorInfo (true);}?>
PclZip overview PclZip is a powerful zip file for compression and decompression...