The zip_read() function reads the next file in a open zip archive.
PHP zip_read() Function has the following syntax.
zip_read(zip)
Parameter | Is Required | Description |
---|---|---|
zip | Required. | Zip resource to read (a zip file opened with zip_open() ) |
This function returns a resource containing a file within the zip archive on success, or FALSE if there is no more entries to read.
Read the next file in a open zip archive
<?php
$zip = zip_open("test.zip");
zip_read($zip);
zip_close($zip);
?>