PHP zip_open() Function

Definition and Usage

The zip_open() function opens a ZIP file for reading.

If successful, it returns the zip file archive resource. If it fails, it returns false.

Syntax

zip_open(filename)
Parameter Description
filename Required. Specifies the filename and path of the zip file to be opened.

Tips and Comments

Tip:The newly opened zip file resource can be zip_read() and zip_close() Function Usage.

Example

<?php
$zip = zip_open("test.zip");
zip_read($zip);
// Some code...
zip_close($zip);
?>