File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: aebf045bfb7f4f2350db5e1e908cf290be334075 Maintainer: dallas Status: ready -->
4- <!-- CREDITS: mowangjuanzi -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: dallas Status: ready -->
4+ <!-- CREDITS: mowangjuanzi, Luffy -->
55<book xml : id =" book.zip" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
66 <?phpdoc extension-membership =" bundledexternal" ?>
77 <title >Zip</title >
88
99 <!-- {{{ preface -->
1010 <preface xml : id =" intro.zip" >
1111 &reftitle.intro;
12- <para >
12+ <simpara >
1313 此扩展能够透明地读取或写入 ZIP 压缩档案及其中的文件。
14- </para >
14+ </simpara >
1515 </preface >
1616 <!-- }}} -->
1717
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 7747acdc55fe497b9e920d6edcbe70c71e03ea30 Maintainer: dallas Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: dallas Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<section xml : id =" zip.installation" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
66 &reftitle.install;
77
88 <section xml : id =" zip.installation.linux" >
99 <title >Linux 系统</title >
10- <para >
10+ <simpara >
1111 必须在编译 PHP 时用 <option role =" configure" >--with-zip</option >
1212 配置选项来提供 zip 支持来使用这些方法。
13- </para >
14- <para >
13+ </simpara >
14+ <simpara >
1515 PHP 7.4.0 之前,PHP 捆绑了 libzip,编译扩展需要使用
1616 <option role =" configure" >--enable-zip</option > 配置项。从 PHP 7.3.0 开始, 不鼓励使用捆绑的 libzip
1717 进行构建,但仍然可以使用 <option role =" configure" >--without-libzip</option > 配置项。
18- </para >
19- <para >
18+ </simpara >
19+ <simpara >
2020 新增 <option role =" configure" >--with-libzip=DIR</option > 配置选项以使用系统
2121 libzip 安装。需要 libzip 版本 0.11,推荐使用 0.11.2 或更高版本。
22- </para >
22+ </simpara >
2323 </section >
2424
2525 <section xml : id =" zip.installation.new.windows" >
2626 <title >Windows</title >
27- <para >
27+ <simpara >
2828 从 PHP 8.2.0 开始,必须在 &php.ini; 中<link linkend =" install.pecl.windows.loading" >启用</link >
2929 <filename >php_zip.dll</filename > DLL。以前内置此扩展。
30- </para >
30+ </simpara >
3131 </section >
3232
3333 <section xml : id =" zip.installation.pecl" >
3434 <title >通过 PECL 安装</title >
35- <para >
35+ <simpara >
3636 &pecl.info;
3737 <link xlink : href =" &url.pecl.package; zip" >&url.pecl.package; zip</link >.
38- </para >
38+ </simpara >
3939 </section >
4040
4141</section >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 8afee82662753fe5ed0c3b8003b14118f00547ef Maintainer: dallas Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: dallas Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<appendix xml : id =" zip.constants" xmlns =" http://docbook.org/ns/docbook" >
66 &reftitle.constants;
77 &extension.constants;
88
9- <para >
9+ <simpara >
1010 <classname >ZipArchive</classname > 使用类常量。有各种类型的常量,主要有:Flag(以 <literal >FL_</literal >
1111 为前缀)、全局 Flag(以 <literal >AFL_</literal > 为前缀)、错误(以 <literal >ER_</literal > 为前缀)以及模式(没有前缀)。
12- </para >
12+ </simpara >
1313
1414 <variablelist xml : id =" ziparchive.constants.mode" >
1515 <title >归档打开模式</title >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: bac24fafb415f56925732ef41ec7b2326ded3d8e Maintainer: dallas Status: ready -->
4- <!-- CREDITS: mowangjuanzi -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: dallas Status: ready -->
4+ <!-- CREDITS: mowangjuanzi, Luffy -->
55<chapter xml : id =" zip.examples" xmlns =" http://docbook.org/ns/docbook" xmlns : xlink =" http://www.w3.org/1999/xlink" >
66 &reftitle.examples;
77 <example >
@@ -79,10 +79,10 @@ print_r($odt_meta);
7979]]>
8080 </programlisting >
8181 </example >
82- <para >
82+ <simpara >
8383 此例使用了旧的 API(PHP 4),它打开了 ZIP 文件归档,读取归档里的每个文件,并输出文件内容。此例用到的
8484 <filename >test2.zip</filename > 文档是 ZZIPlib 源分布里测试文档中的一个。
85- </para >
85+ </simpara >
8686 <example >
8787 <title >Zip 使用范例</title >
8888 <programlisting role =" php" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: Jeff Liu Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: Jeff Liu Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<refentry xml : id =" function.zip-close" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
1919 <type >void</type ><methodname >zip_close</methodname >
2020 <methodparam ><type >resource</type ><parameter >zip</parameter ></methodparam >
2121 </methodsynopsis >
22- <para >
22+ <simpara >
2323 关闭一个指定的ZIP档案文件。
24- </para >
24+ </simpara >
2525 </refsect1 >
2626 <refsect1 role =" parameters" >
2727 &reftitle.parameters;
3030 <varlistentry >
3131 <term ><parameter >zip</parameter ></term >
3232 <listitem >
33- <para >
33+ <simpara >
3434 一个由<function >zip_open</function >打开的ZIP文件资源。
35- </para >
35+ </simpara >
3636 </listitem >
3737 </varlistentry >
3838 </variablelist >
3939 </para >
4040 </refsect1 >
4141 <refsect1 role =" returnvalues" >
4242 &reftitle.returnvalues;
43- <para >
43+ <simpara >
4444 &return.void;
45- </para >
45+ </simpara >
4646 </refsect1 >
4747
4848 <refsect1 role =" changelog" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: Jeff Liu Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: Jeff Liu Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<refentry xml : id =" function.zip-entry-close" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
1919 <type >bool</type ><methodname >zip_entry_close</methodname >
2020 <methodparam ><type >resource</type ><parameter >zip_entry</parameter ></methodparam >
2121 </methodsynopsis >
22- <para >
22+ <simpara >
2323 关闭指定的目录项。
24- </para >
24+ </simpara >
2525 </refsect1 >
2626 <refsect1 role =" parameters" >
2727 &reftitle.parameters;
3030 <varlistentry >
3131 <term ><parameter >zip_entry</parameter ></term >
3232 <listitem >
33- <para >
33+ <simpara >
3434 一个由<function >zip_entry_open</function >打开的项目。
35- </para >
35+ </simpara >
3636 </listitem >
3737 </varlistentry >
3838 </variablelist >
3939 </para >
4040 </refsect1 >
4141 <refsect1 role =" returnvalues" >
4242 &reftitle.returnvalues;
43- <para >
43+ <simpara >
4444 &return.success;
45- </para >
45+ </simpara >
4646 </refsect1 >
4747
4848 <refsect1 role =" changelog" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: Jeff Liu Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: Jeff Liu Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<refentry xml : id =" function.zip-entry-compressedsize" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
1919 <type class =" union" ><type >int</type ><type >false</type ></type ><methodname >zip_entry_compressedsize</methodname >
2020 <methodparam ><type >resource</type ><parameter >zip_entry</parameter ></methodparam >
2121 </methodsynopsis >
22- <para >
22+ <simpara >
2323 返回指定目录项压缩过后的大小。
24- </para >
24+ </simpara >
2525 </refsect1 >
2626 <refsect1 role =" parameters" >
2727 &reftitle.parameters;
3030 <varlistentry >
3131 <term ><parameter >zip_entry</parameter ></term >
3232 <listitem >
33- <para >
33+ <simpara >
3434 由函数<function >zip_read</function > 返回的目录项。
35- </para >
35+ </simpara >
3636 </listitem >
3737 </varlistentry >
3838 </variablelist >
3939 </para >
4040 </refsect1 >
4141 <refsect1 role =" returnvalues" >
4242 &reftitle.returnvalues;
43- <para >
43+ <simpara >
4444 压缩后的大小,&return.falseforfailure; 。
45- </para >
45+ </simpara >
4646 </refsect1 >
4747
4848 <refsect1 role =" changelog" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: Jeff Liu Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: Jeff Liu Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<refentry xml : id =" function.zip-entry-compressionmethod" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
1919 <type class =" union" ><type >string</type ><type >false</type ></type ><methodname >zip_entry_compressionmethod</methodname >
2020 <methodparam ><type >resource</type ><parameter >zip_entry</parameter ></methodparam >
2121 </methodsynopsis >
22- <para >
22+ <simpara >
2323 返回由函数<parameter >zip_entry</parameter >确定的目录实体的压缩方法。
24- </para >
24+ </simpara >
2525 </refsect1 >
2626 <refsect1 role =" parameters" >
2727 &reftitle.parameters;
3030 <varlistentry >
3131 <term ><parameter >zip_entry</parameter ></term >
3232 <listitem >
33- <para >
33+ <simpara >
3434 由函数<function >zip_read</function > 返回的目录实体。
35- </para >
35+ </simpara >
3636 </listitem >
3737 </varlistentry >
3838 </variablelist >
3939 </para >
4040 </refsect1 >
4141 <refsect1 role =" returnvalues" >
4242 &reftitle.returnvalues;
43- <para >
43+ <simpara >
4444 压缩方法,&return.falseforfailure; 。
45- </para >
45+ </simpara >
4646 </refsect1 >
4747
4848 <refsect1 role =" changelog" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: Jeff Liu Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: Jeff Liu Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<refentry xml : id =" function.zip-entry-filesize" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
1919 <type class =" union" ><type >int</type ><type >false</type ></type ><methodname >zip_entry_filesize</methodname >
2020 <methodparam ><type >resource</type ><parameter >zip_entry</parameter ></methodparam >
2121 </methodsynopsis >
22- <para >
22+ <simpara >
2323 返回指定目录实体的实际大小。
24- </para >
24+ </simpara >
2525 </refsect1 >
2626 <refsect1 role =" parameters" >
2727 &reftitle.parameters;
3030 <varlistentry >
3131 <term ><parameter >zip_entry</parameter ></term >
3232 <listitem >
33- <para >
33+ <simpara >
3434 由函数<function >zip_read</function > 返回的目录实体。
35- </para >
35+ </simpara >
3636 </listitem >
3737 </varlistentry >
3838 </variablelist >
3939 </para >
4040 </refsect1 >
4141 <refsect1 role =" returnvalues" >
4242 &reftitle.returnvalues;
43- <para >
43+ <simpara >
4444 返回该目录实体的大小,&return.falseforfailure; 。
45- </para >
45+ </simpara >
4646 </refsect1 >
4747
4848 <refsect1 role =" changelog" >
Original file line number Diff line number Diff line change 11<?xml version =" 1.0" encoding =" utf-8" ?>
22<!-- $Revision$ -->
3- <!-- EN-Revision: 9b1673cf114a1e10c4563ab9223cb56aed552b89 Maintainer: Jeff Liu Status: ready -->
3+ <!-- EN-Revision: 963af75faf771d12d38a74d1c3449586ac0a966a Maintainer: Jeff Liu Status: ready -->
44<!-- CREDITS: mowangjuanzi, Luffy -->
55<refentry xml : id =" function.zip-entry-name" xmlns =" http://docbook.org/ns/docbook" >
66 <refnamediv >
1919 <type class =" union" ><type >string</type ><type >false</type ></type ><methodname >zip_entry_name</methodname >
2020 <methodparam ><type >resource</type ><parameter >zip_entry</parameter ></methodparam >
2121 </methodsynopsis >
22- <para >
22+ <simpara >
2323 返回指定目录项的名称。
24- </para >
24+ </simpara >
2525 </refsect1 >
2626 <refsect1 role =" parameters" >
2727 &reftitle.parameters;
3030 <varlistentry >
3131 <term ><parameter >zip_entry</parameter ></term >
3232 <listitem >
33- <para >
33+ <simpara >
3434 由函数<function >zip_read</function > 返回的目录项。
35- </para >
35+ </simpara >
3636 </listitem >
3737 </varlistentry >
3838 </variablelist >
3939 </para >
4040 </refsect1 >
4141 <refsect1 role =" returnvalues" >
4242 &reftitle.returnvalues;
43- <para >
43+ <simpara >
4444 目录项的名称,&return.falseforfailure; 。
45- </para >
45+ </simpara >
4646 </refsect1 >
4747
4848 <refsect1 role =" changelog" >
You can’t perform that action at this time.
0 commit comments