PHP zip_entry_compressionmethod() İşlevi
Örnek
Bir ZIP dosyası arşivi açın ve dizin girişlerinin adını ve sıkıştırma yöntemini alın:
<?php
$zip = zip_open("test.zip");
if ($zip) {
while ($zip_entry = zip_read($zip)) {
echo "<p>";
// Get name
of directory entry
echo "Name: " . zip_entry_name($zip_entry) . "<br>";
// Get
compression method
echo "Compression method: " . zip_entry_compressionmethod($zip_entry);
echo "</p>";
}
zip_close($zip);
}
?>
Kodun çıktısı, ZIP arşivinin içeriğine bağlıdır:
Name: ziptest.txt
Compression method: deflated
Name: htmlziptest.html
Compression method: deflated
Tanım ve Kullanım
zip_entry_compressionmethod() işlevi, bir ZIP dizini girişinin sıkıştırma yöntemini döndürür.
Sözdizimi
zip_entry_compressionmethod(zip_entry)
Parametre Değerleri
Parameter | Description |
---|---|
zip_entry | Required. Specifies the ZIP directory entry returned by zip_read() |
Teknik detaylar
Geri dönüş değeri: | sıkıştırma yöntemi |
---|---|
PHP Sürümü: | 4.1.0+ |
❮ PHP Zip Referansı