PHP zip_read() Function

In this chapter you will learn:

  1. Description for PHP zip_read() Function
  2. Syntax for PHP zip_read() Function
  3. Parameter for PHP zip_read() Function
  4. Return for PHP zip_read() Function
  5. Example - reads the next file in a open zip archive

Description

The zip_read() function reads the next file in a open zip archive.

Syntax

PHP zip_read() Function has the following syntax.

zip_read(zip)

Parameter

ParameterIs RequiredDescription
zipRequired.Zip resource to read (a zip file opened with zip_open() )

Return

This function returns a resource containing a file within the zip archive on success, or FALSE if there is no more entries to read.

Example

Read the next file in a open zip archive


<?php/* j  av a 2 s . c  om*/
$zip = zip_open("test.zip");
zip_read($zip);
zip_close($zip);
?>
Home » PHP Tutorial » PHP Zip Functions
PHP Zip Library Installation
PHP zip_close() Function
PHP zip_entry_close() Function
PHP zip_entry_compressedsize() Function
PHP zip_entry_compressionmethod() Function
PHP zip_entry_filesize() Function
PHP zip_entry_name() Function
PHP zip_entry_open() Function
PHP zip_entry_read() Function
PHP zip_open() Function
PHP zip_read() Function