PHP zip_entry_filesize() Function

Description

The zip_entry_filesize() function returns the original file size before compression of a zip archive entry.

Syntax

PHP zip_entry_filesize() Function has the following syntax.

zip_entry_filesize(zip_entry)

Parameter

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

Return

The size of the directory entry.

Example

Returns the original file size before compression of a zip archive entry


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

if ($zip){
  while ($zip_entry = zip_read($zip)){
    echo "Name: " . zip_entry_name($zip_entry);
    echo "Original size: " . zip_entry_filesize($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