PHP Zip File function

Source: Internet
Author: User

PhpZip File function Introduction to PHP Zip File

The zip file function allows you to read compressed files.


To run the Zip File function on the server, you must install these libraries:

    • Guido Draheim's zziplib library: Download Zziplib Library
    • Zip pelc extension: Download zip pelc extension

Installing on a Linux system

PHP 5+: The ZIP function and zip library are not enabled by default and must be downloaded from the link above. Please use the --with-zip=dir configuration option to include zip support.

Installing on a Windows system

PHP 5+: The ZIP function is not enabled by default and you must download the Php_zip.dll and zziplib libraries from the links above. You must enable Php_zip.dll in php.ini.

To enable any PHP extension, the PHP extension_dir setting (in the php.ini file) should be set to the directory where the PHP extension resides. The value for example Extension_dir may be c:\php\ext.

PHP Zip File function

php: Indicates the earliest version of PHP that supports this function.

function description PHP
zip_close () close the zip file. 4
zip_entry_close () Close one of the items in the zip file. 4
zip_entry_compressedsize () returns the compressed size of an item in a ZIP file. 4
zip_entry_compressionmethod () Returns the compression method for an item in a ZIP file. 4
zip_entry_filesize () returns the actual file size of an item in a ZIP file. 4
zip_entry_name () returns the name of an item in the zip file. 4
zip_entry_open () Open an item in the ZIP file for reading. 4
zip_entry_read () reads an open project from a zip file. 4
zip_open () open the zip file. 4
zip_read () reads the next item in the zip file. 4

PHP Zip File function

Related 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: 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.