Get the compression method of a zip archive entry in PHP

Description

The following code shows how to get the compression method of a zip archive entry.

Example


  //from w w  w  . j  ava2s  .  c om
<?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 "Compression Method: " . zip_entry_compressionmethod($zip_entry);
         echo "</p>";
      }
      zip_close($zip);
    }
?>




















Home »
  PHP Tutorial »
    File »




Directory
DirectoryIterator
Drive
File
File Permission
File Read Save
FileSystemIterator
Path
Zip