<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/refs.compression.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'zh',
  ),
  'this' => 
  array (
    0 => 'book.zip.php',
    1 => 'Zip',
    2 => 'Zip',
  ),
  'up' => 
  array (
    0 => 'refs.compression.php',
    1 => '压缩与归档扩展',
  ),
  'prev' => 
  array (
    0 => 'rarexception.setusingexceptions.php',
    1 => 'RarException::setUsingExceptions',
  ),
  'next' => 
  array (
    0 => 'zip.setup.php',
    1 => '安装/配置',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'zh',
    'path' => 'reference/zip/book.xml',
  ),
  'history' => 
  array (
  ),
  'extra_header_links' => 
  array (
    'rel' => 'alternate',
    'href' => '/manual/en/feeds/book.zip.atom',
    'type' => 'application/atom+xml',
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="book.zip" class="book">
 
 <h1 class="title">Zip</h1>
 
 
 <div id="intro.zip" class="preface">
  <h1 class="title">简介</h1>
  <p class="para">
   此扩展能够透明地读取或写入 ZIP 压缩档案及其中的文件。
  </p>
 </div>
 
 
 








 






 







 







 
 








<ul class="chunklist chunklist_book"><li><a href="zip.setup.php">安装/配置</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="zip.requirements.php">需求</a></li><li><a href="zip.installation.php">安装</a></li><li><a href="zip.resources.php">资源类型</a></li></ul></li><li><a href="zip.constants.php">预定义常量</a></li><li><a href="zip.examples.php">示例</a></li><li><a href="class.ziparchive.php">ZipArchive</a> — ZipArchive 类<ul class="chunklist chunklist_book chunklist_children"><li><a href="ziparchive.addemptydir.php">ZipArchive::addEmptyDir</a> — Add a new directory</li><li><a href="ziparchive.addfile.php">ZipArchive::addFile</a> — Adds a file to a ZIP archive from the given path</li><li><a href="ziparchive.addfromstring.php">ZipArchive::addFromString</a> — Add a file to a ZIP archive using its contents</li><li><a href="ziparchive.addglob.php">ZipArchive::addGlob</a> — Add files from a directory by glob pattern</li><li><a href="ziparchive.addpattern.php">ZipArchive::addPattern</a> — Add files from a directory by PCRE pattern</li><li><a href="ziparchive.clearerror.php">ZipArchive::clearError</a> — 清除状态错误消息、系统和/或 zip 消息</li><li><a href="ziparchive.close.php">ZipArchive::close</a> — Close the active archive (opened or newly created)</li><li><a href="ziparchive.count.php">ZipArchive::count</a> — Counts the number of files in the archive</li><li><a href="ziparchive.deleteindex.php">ZipArchive::deleteIndex</a> — Delete an entry in the archive using its index</li><li><a href="ziparchive.deletename.php">ZipArchive::deleteName</a> — Delete an entry in the archive using its name</li><li><a href="ziparchive.extractto.php">ZipArchive::extractTo</a> — 解压缩文件</li><li><a href="ziparchive.getarchivecomment.php">ZipArchive::getArchiveComment</a> — Returns the Zip archive comment</li><li><a href="ziparchive.getarchiveflag.php">ZipArchive::getArchiveFlag</a> — 返回 Zip 归档全局 flag 的值</li><li><a href="ziparchive.getcommentindex.php">ZipArchive::getCommentIndex</a> — Returns the comment of an entry using the entry index</li><li><a href="ziparchive.getcommentname.php">ZipArchive::getCommentName</a> — Returns the comment of an entry using the entry name</li><li><a href="ziparchive.getexternalattributesindex.php">ZipArchive::getExternalAttributesIndex</a> — Retrieve the external attributes of an entry defined by its index</li><li><a href="ziparchive.getexternalattributesname.php">ZipArchive::getExternalAttributesName</a> — Retrieve the external attributes of an entry defined by its name</li><li><a href="ziparchive.getfromindex.php">ZipArchive::getFromIndex</a> — Returns the entry contents using its index</li><li><a href="ziparchive.getfromname.php">ZipArchive::getFromName</a> — Returns the entry contents using its name</li><li><a href="ziparchive.getnameindex.php">ZipArchive::getNameIndex</a> — Returns the name of an entry using its index</li><li><a href="ziparchive.getstatusstring.php">ZipArchive::getStatusString</a> — Returns the status error message, system and/or zip messages</li><li><a href="ziparchive.getstream.php">ZipArchive::getStream</a> — Get a file handler to the entry defined by its name (read only)</li><li><a href="ziparchive.getstreamindex.php">ZipArchive::getStreamIndex</a> — Get a file handler to the entry defined by its index (read only)</li><li><a href="ziparchive.getstreamname.php">ZipArchive::getStreamName</a> — Get a file handler to the entry defined by its name (read only)</li><li><a href="ziparchive.iscompressionmethoddupported.php">ZipArchive::isCompressionMethodSupported</a> — Check if a compression method is supported by libzip</li><li><a href="ziparchive.isencryptionmethoddupported.php">ZipArchive::isEncryptionMethodSupported</a> — Check if a encryption method is supported by libzip</li><li><a href="ziparchive.locatename.php">ZipArchive::locateName</a> — Returns the index of the entry in the archive</li><li><a href="ziparchive.open.php">ZipArchive::open</a> — Open a ZIP file archive</li><li><a href="ziparchive.registercancelcallback.php">ZipArchive::registerCancelCallback</a> — Register a callback to allow cancellation during archive close.</li><li><a href="ziparchive.registerprogresscallback.php">ZipArchive::registerProgressCallback</a> — Register a callback to provide updates during archive close.</li><li><a href="ziparchive.renameindex.php">ZipArchive::renameIndex</a> — Renames an entry defined by its index</li><li><a href="ziparchive.renamename.php">ZipArchive::renameName</a> — Renames an entry defined by its name</li><li><a href="ziparchive.replacefile.php">ZipArchive::replaceFile</a> — Replace file in ZIP archive with a given path</li><li><a href="ziparchive.setarchivecomment.php">ZipArchive::setArchiveComment</a> — Set the comment of a ZIP archive</li><li><a href="ziparchive.setarchiveflag.php">ZipArchive::setArchiveFlag</a> — 设置 ZIP 归档的全局 flag</li><li><a href="ziparchive.setcommentindex.php">ZipArchive::setCommentIndex</a> — Set the comment of an entry defined by its index</li><li><a href="ziparchive.setcommentname.php">ZipArchive::setCommentName</a> — Set the comment of an entry defined by its name</li><li><a href="ziparchive.setcompressionindex.php">ZipArchive::setCompressionIndex</a> — Set the compression method of an entry defined by its index</li><li><a href="ziparchive.setcompressionname.php">ZipArchive::setCompressionName</a> — Set the compression method of an entry defined by its name</li><li><a href="ziparchive.setencryptionindex.php">ZipArchive::setEncryptionIndex</a> — Set the encryption method of an entry defined by its index</li><li><a href="ziparchive.setencryptionname.php">ZipArchive::setEncryptionName</a> — Set the encryption method of an entry defined by its name</li><li><a href="ziparchive.setexternalattributesindex.php">ZipArchive::setExternalAttributesIndex</a> — Set the external attributes of an entry defined by its index</li><li><a href="ziparchive.setexternalattributesname.php">ZipArchive::setExternalAttributesName</a> — Set the external attributes of an entry defined by its name</li><li><a href="ziparchive.setmtimeindex.php">ZipArchive::setMtimeIndex</a> — Set the modification time of an entry defined by its index</li><li><a href="ziparchive.setmtimename.php">ZipArchive::setMtimeName</a> — Set the modification time of an entry defined by its name</li><li><a href="ziparchive.setpassword.php">ZipArchive::setPassword</a> — Set the password for the active archive</li><li><a href="ziparchive.statindex.php">ZipArchive::statIndex</a> — Get the details of an entry defined by its index</li><li><a href="ziparchive.statname.php">ZipArchive::statName</a> — Get the details of an entry defined by its name</li><li><a href="ziparchive.unchangeall.php">ZipArchive::unchangeAll</a> — Undo all changes done in the archive</li><li><a href="ziparchive.unchangearchive.php">ZipArchive::unchangeArchive</a> — Revert all global changes done in the archive</li><li><a href="ziparchive.unchangeindex.php">ZipArchive::unchangeIndex</a> — Revert all changes done to an entry at the given index</li><li><a href="ziparchive.unchangename.php">ZipArchive::unchangeName</a> — Revert all changes done to an entry with the given name</li></ul></li><li><a href="ref.zip.php">Zip 函数</a><ul class="chunklist chunklist_book chunklist_children"><li><a href="function.zip-close.php">zip_close</a> — 关闭一个ZIP档案文件</li><li><a href="function.zip-entry-close.php">zip_entry_close</a> — 关闭目录项</li><li><a href="function.zip-entry-compressedsize.php">zip_entry_compressedsize</a> — 检索目录项压缩过后的大小</li><li><a href="function.zip-entry-compressionmethod.php">zip_entry_compressionmethod</a> — 检索目录实体的压缩方法</li><li><a href="function.zip-entry-filesize.php">zip_entry_filesize</a> — 检索目录实体的实际大小</li><li><a href="function.zip-entry-name.php">zip_entry_name</a> — 检索目录项的名称</li><li><a href="function.zip-entry-open.php">zip_entry_open</a> — 打开用于读取的目录实体</li><li><a href="function.zip-entry-read.php">zip_entry_read</a> — 读取一个打开了的压缩目录实体</li><li><a href="function.zip-open.php">zip_open</a> — 打开 ZIP 文件归档</li><li><a href="function.zip-read.php">zip_read</a> — 读取 ZIP 文件归档中下一项</li></ul></li></ul></div><?php manual_footer($setup); ?>