Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

PHP Zip File function


May 11, 2021 PHP


Table of contents


PHP Zip File function

With the related functions in PHP, you can decompress the zip file!


Introduction to PHP Zip File

The Zip File function allows you to read compressed files.


Installation

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

Installed on a Linux system

PHP 5+: Z ip functions and Zip libraries 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.

Installed on a Windows system

PHP 5+: Z ip functions are not enabled by default and must be downloaded from the php_zip.dll and ZZIPlib libraries. You must enable .ini in php php_zip.dll.

To enable any PHP extension, the PHP extension_dir settings (in php.ini file) should be set to the directory in which the PHP extension is located. For example extension_dir value of a file may be c:\php\ext.


PHP Zip File function

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

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


PHP Zip File constant

There are no related constants in the PHP Zip File function.