array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'zh', ), 'this' => array ( 0 => 'wrappers.compression.php', 1 => 'zlib://', ), 'up' => array ( 0 => 'wrappers.php', 1 => '支持的协议和封装协议', ), 'prev' => array ( 0 => 'wrappers.php.php', 1 => 'php://', ), 'next' => array ( 0 => 'wrappers.data.php', 1 => 'data://', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'zh', 'path' => 'language/wrappers/compression.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
zlib:// -- bzip2:// -- zip:// — 压缩流
compress.zlib:// and compress.bzip2://
zlib: 的功能类似 gzopen(),但是 其数据流还能被 fread() 和其他文件系统函数使用。 不建议使用,因为会和其他带“:”字符的文件名混淆; 请使用 compress.zlib:// 替代。
compress.zlib://、 compress.bzip2:// 和 gzopen()、bzopen() 是相等的。并且可以在不支持 fopencookie 的系统中使用。
ZIP 扩展 注册了 zip: 封装器。
自 PHP 7.2.0 和 libzip 1.2.0+ 起,加密归档开始支持密码,允许数据流中使用密码。
字节流上下文(stream contexts)中使用 'password'
选项设置密码。