PHP zip_entry_compressedsize() 函数

PHP 教程 · 2019-01-30 22:29:27

定义和用法

zip_entry_compressedsize() 函数返回 zip 档案项目的压缩文件尺寸。

语法


zip_entry_compressedsize(zip_entry)


参数 描述
zip_entry 必需。规定要读取的 zip 项目资源(由 zip_read() 打开的 zip 项目)。

实例


<?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 "Compressed Size: "
    . zip_entry_compressedsize($zip_entry);
    echo "</p>";
    }
  zip_close($zip);
  }
?>

上面的代码将输出:


Name: ziptest.txt
Compressed Size: 56
Name: htmlziptest.html
Compressed Size: 101


点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html

查看所有标签

Graph Algorithms

Graph Algorithms

Shimon Even / Cambridge University Press / 2011-9-19 / USD 32.99

Shimon Even's Graph Algorithms, published in 1979, was a seminal introductory book on algorithms read by everyone engaged in the field. This thoroughly revised second edition, with a foreword by Richa......一起来看看 《Graph Algorithms》 这本书的介绍吧!

随机密码生成器
随机密码生成器

多种字符组合密码

URL 编码/解码
URL 编码/解码

URL 编码/解码

SHA 加密
SHA 加密

SHA 加密工具