PHP zip_entry_read() Function

zip_entry_read — Read from an open directory entry

string zip_entry_read ( resource $zip_entry [, int $length = 1024 ] )

Reads from an open directory entry.

The zip_entry_read() function gets the contents from a open zip archive entry.

Example -

The output of the code depends on the contents of the zip archive:

Name: ziptest.txt

File Contents:

Hello World! This is a test for a the zip functions in PHP.

Name: htmlziptest.html

File Contents:

Hello World!

This is a test for a the zip functions in PHP.

ParameterDescription
zip_entryA directory entry returned by zip_read().
lengthThe number of bytes to return.

Return Values-

Returns the data read, empty string on end of a file, or FALSE on error.