PHP zip_entry_open() Function

Description

The zip_entry_open() function opens a zip archive entry for reading.

Syntax

PHP zip_entry_open() Function has the following syntax.

zip_entry_open(zip,zip_entry,mode)

Parameter

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

Return

This function returns TRUE on success, or FALSE on failure.

Example

Open a zip archive entry for reading


<?php//w  w  w  .  ja  v a 2s.  c  o  m
$zip = zip_open("test.zip");

if ($zip){
   while ($zip_entry = zip_read($zip)){
      echo "Name: " . zip_entry_name($zip_entry);
      if (zip_entry_open($zip, $zip_entry)){
  
      }
   }
   zip_close($zip);
}
?>




















Home »
  PHP Tutorial »
    Function reference »




PHP Array Functions
PHP Calendar Functions
PHP Class Functions
PHP Data Type Functions
PHP Date Functions
PHP File Functions
PHP Image Functions
PHP Math Functions
PHP MySQLi Functions
PHP SimpleXML Functions
PHP String Functions
PHP XML Functions
PHP Zip Functions