Current Location: Home> Function Categories> zip_entry_filesize

zip_entry_filesize

Returns the actual file size of an item in the ZIP file.
Name:zip_entry_filesize
Category:Uncategorized
Programming Language:php
One-line Description:Returns the actual file size of an item in the ZIP file.

Definition and usage

zip_entry_filesize() function returns the original size of the zip archive item (before compression).

实例

<?php
$zip = zip_open("test.zip");

if ($zip)
  {
  while ($zip_entry = zip_read($zip))
    {
    echo "<p>";
    echo "Name: " . zip_entry_name($zip_entry) . "<br />";
    echo "Original size: " . zip_entry_filesize($zip_entry);
    echo "</p>";
    }
  zip_close($zip);
  }
?>

输出:

Name: ziptest.txt
Original size: 68

Name: htmlziptest.html
Original size: 159

grammar

 zip_entry_filesize ( zip_entry )
parameter describe
zip_entry Required. Specifies the zip project resource to be read (zip project opened by zip_read()).
Similar Functions
Popular Articles