PHP Tutorial - PHP zip_open() Function






The zip_open() function opens a zip archive for reading.

Syntax

PHP zip_open() Function has the following syntax.

zip_open(filename)

Parameter

ParameterIs RequiredDescription
filenameRequired.Filename and path of the zip file to open

Return

This function returns a open zip file resource on success, or FALSE on failure.

Example

Open a zip archive for reading


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