Decompress and compress the PclZip plug-in file in php

Source: Internet
Author: User
Recently, I was developing my Wordpress plug-in ShareLink. during this process, I found the PHP class of the zip file for PclZip. I have to recommend it, another reason for recommendation is that I found a PHP function in its source code... recently, I was developing my Wordpress plug-in ShareLink. during this process, I found the PHP class of the zip file for PclZip. I have to recommend it, 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.

Generate a zip file. usage 1: The code is as follows:

 Create('file.txt, data/text.txt, folder '); if ($ v_list = 0) {die ("Error:". $ archive-> errorInfo (true ));}

The code is as follows:

 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 ));}

If you see no parameters for the create method, you will know how to look at the method prototype. at least I have not used this method.

Tutorial URL:

You are welcome to add your _ favorites to the Favorites folder, but please keep the link for this article.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.