mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
Whitespace fix. Please don't touch the other files who have been changed with the last commit.
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@57635 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
3a25d9ef15
commit
7a896f70aa
1 changed files with 359 additions and 349 deletions
|
@ -1,46 +1,46 @@
|
|||
<?xml encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.10 $ -->
|
||||
<reference id="ref.zip">
|
||||
<title>Zip File Functions (Read Only Access)</title>
|
||||
<titleabbrev>Zip</titleabbrev>
|
||||
<partintro>
|
||||
<para>
|
||||
This module uses the functions of the <ulink
|
||||
url="&url.zziplib;">ZZIPlib</ulink> library by Guido Draheim to
|
||||
transparently read ZIP compressed archives and the files
|
||||
inside them.
|
||||
</para>
|
||||
<para>
|
||||
Please note that ZZIPlib only provides a subset of functions
|
||||
provided in a full implementation of the ZIP compression algorithm
|
||||
and can only read ZIP file archives. A normal ZIP utility is
|
||||
needed to create the ZIP file archives read by this library.
|
||||
</para>
|
||||
<para>
|
||||
Zip support in PHP is not enabled by default. You will need to
|
||||
use the <link
|
||||
linkend="install.configure.with-zip">--with-zip</link>
|
||||
configuration option when compiling PHP to enable zip
|
||||
support. This module requires ZZIPlib version >= 0.10.6.
|
||||
</para>
|
||||
<note>
|
||||
<!-- $Revision: 1.11 $ -->
|
||||
<reference id="ref.zip">
|
||||
<title>Zip File Functions (Read Only Access)</title>
|
||||
<titleabbrev>Zip</titleabbrev>
|
||||
<partintro>
|
||||
<para>
|
||||
This module uses the functions of the <ulink
|
||||
url="&url.zziplib;">ZZIPlib</ulink> library by Guido Draheim to
|
||||
transparently read ZIP compressed archives and the files inside
|
||||
them.
|
||||
</para>
|
||||
<para>
|
||||
Please note that ZZIPlib only provides a subset of functions
|
||||
provided in a full implementation of the ZIP compression algorithm
|
||||
and can only read ZIP file archives. A normal ZIP utility is
|
||||
needed to create the ZIP file archives read by this library.
|
||||
</para>
|
||||
<para>
|
||||
Zip support in PHP is not enabled by default. You will need to
|
||||
use the <link
|
||||
linkend="install.configure.with-zip">--with-zip</link>
|
||||
configuration option when compiling PHP to enable zip
|
||||
support. This module requires ZZIPlib version >= 0.10.6.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Zip support before PHP 4.0.7 is experimental. This section
|
||||
reflects the Zip extension as it exists in PHP 4.0.7 and later.
|
||||
</para>
|
||||
</note>
|
||||
</para>
|
||||
</note>
|
||||
|
||||
<sect1 id="zip-example">
|
||||
<title>Example Usage</title>
|
||||
<para>
|
||||
This example opens a ZIP file archive, reads each file in the
|
||||
archive and prints out its contents. The
|
||||
<filename>test2.zip</filename> archive used in this example is
|
||||
one of the test archives in the ZZIPlib source distribution.
|
||||
</para>
|
||||
<example>
|
||||
<title>Zip Usage Example</title>
|
||||
<programlisting role="php">
|
||||
<sect1 id="zip-example">
|
||||
<title>Example Usage</title>
|
||||
<para>
|
||||
This example opens a ZIP file archive, reads each file in the
|
||||
archive and prints out its contents. The
|
||||
<filename>test2.zip</filename> archive used in this example is
|
||||
one of the test archives in the ZZIPlib source distribution.
|
||||
</para>
|
||||
<example>
|
||||
<title>Zip Usage Example</title>
|
||||
<programlisting role="php">
|
||||
<?php
|
||||
|
||||
$zip = zip_open("/tmp/test2.zip");
|
||||
|
@ -69,327 +69,337 @@ if ($zip) {
|
|||
}
|
||||
|
||||
?>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</partintro>
|
||||
</programlisting>
|
||||
</example>
|
||||
</sect1>
|
||||
</partintro>
|
||||
|
||||
<refentry id="function.zip-close">
|
||||
<refnamediv>
|
||||
<refname>zip_close</refname>
|
||||
<refpurpose>Close a Zip File Archive</refpurpose>
|
||||
<refentry id="function.zip-close">
|
||||
<refnamediv>
|
||||
<refname>zip_close</refname>
|
||||
<refpurpose>Close a Zip File Archive</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>zip_close</function></funcdef>
|
||||
<paramdef>resource <parameter>zip</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Closes a zip file archive. The parameter
|
||||
<parameter>zip</parameter> must be a zip archive previously
|
||||
opened by <function>zip_open</function>.
|
||||
</para>
|
||||
<para>
|
||||
This function has no return value.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-close">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_close</refname>
|
||||
<refpurpose>Close a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>zip_entry_close</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Closes a directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> must be a valid directory entry
|
||||
opened by <function>zip_entry_open</function>.
|
||||
</para>
|
||||
<para>
|
||||
This function has no return value.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_entry_open</function> and
|
||||
<function>zip_entry_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-compressedsize">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_compressedsize</refname>
|
||||
<refpurpose>Retrieve the Compressed Size of a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>zip_entry_compressedsize</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the compressed size of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-compressionmethod">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_compressionmethod</refname>
|
||||
<refpurpose>Retrieve the Compression Method of a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>zip_entry_compressionmethod</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the compression method of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-filesize">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_filesize</refname>
|
||||
<refpurpose>Retrieve the Actual File Size of a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>zip_entry_filesize</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the actual size of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-name">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_name</refname>
|
||||
<refpurpose>Retrieve the Name of a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>zip_entry_name</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the name of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-open">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_open</refname>
|
||||
<refpurpose>Open a Directory Entry for Reading</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>bool <function>zip_entry_open</function></funcdef>
|
||||
<paramdef>resource <parameter>zip</parameter></paramdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
<paramdef>string <parameter><optional>mode</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Opens a directory entry in a zip file for reading. The parameter
|
||||
<parameter>zip</parameter> is a valid resource handle returned by
|
||||
<function>zip_open</function>. The parameter
|
||||
<parameter>zip_entry</parameter> is a directory entry resource
|
||||
returned by <function>zip_read</function>. The optional parameter
|
||||
<parameter>mode</parameter> can be any of the modes specified in
|
||||
the documentaion for <function>fopen</function>.
|
||||
</para>
|
||||
<note>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>zip_close</function></funcdef>
|
||||
<paramdef>resource <parameter>zip</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Currently, <parameter>mode</parameter> is ignored and is always
|
||||
<literal>"rb"</literal>. This is due to the fact that zip
|
||||
support in PHP is read only access. Please see
|
||||
<function>fopen</function> for an explanation of various modes,
|
||||
including <literal>"rb"</literal>.
|
||||
Closes a zip file archive. The parameter
|
||||
<parameter>zip</parameter> must be a zip archive previously
|
||||
opened by <function>zip_open</function>.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Returns &true; on succes or &false; on failure.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Unlike <function>fopen</function> and other similar functions,
|
||||
the return value of <function>zip_entry_open</function> only
|
||||
indicates the result of the operation and is not needed for
|
||||
reading or closing the directory entry.
|
||||
This function has no return value.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>zip_entry_read</function> and
|
||||
<function>zip_entry_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-read">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_read</refname>
|
||||
<refpurpose>Read From an Open Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>zip_entry_read</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
<paramdef>int <parameter><optional>length</optional></parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Reads up to <parameter>length</parameter> bytes from an open
|
||||
directory entry. If <parameter>length</parameter> is not
|
||||
specified, then <function>zip_entry_read</function> will attempt
|
||||
to read 1024 bytes. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>length</parameter> parameter should be the
|
||||
uncompressed length you wish to read.
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Returns the data read, or &false; if the end of
|
||||
the file is reached.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_entry_open</function>,
|
||||
<function>zip_entry_close</function> and
|
||||
<function>zip_entry_filesize</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-open">
|
||||
<refnamediv>
|
||||
<refname>zip_open</refname>
|
||||
<refpurpose>Open a Zip File Archive</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>resource <function>zip_open</function></funcdef>
|
||||
<paramdef>string <parameter>filename</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Opens a new zip archive for reading. The
|
||||
<parameter>filename</parameter> parameter is the filename of the
|
||||
zip archive to open.
|
||||
</para>
|
||||
<para>
|
||||
Returns a resource handle for later use with
|
||||
<function>zip_read</function> and
|
||||
<function>zip_close</function> or returns
|
||||
&false; if <parameter>filename</parameter> does
|
||||
not exist.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_read</function> and
|
||||
<function>zip_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
<refentry id="function.zip-entry-close">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_close</refname>
|
||||
<refpurpose>Close a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>void <function>zip_entry_close</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Closes a directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> must be a valid directory entry
|
||||
opened by <function>zip_entry_open</function>.
|
||||
</para>
|
||||
<para>
|
||||
This function has no return value.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_entry_open</function> and
|
||||
<function>zip_entry_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-read">
|
||||
<refnamediv>
|
||||
<refname>zip_read</refname>
|
||||
<refpurpose>Read Next Entry in a Zip File Archive</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>resource <function>zip_read</function></funcdef>
|
||||
<paramdef>resource <parameter>zip</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Reads the next entry in a zip file archive. The parameter
|
||||
<parameter>zip</parameter> must be a zip archive previously
|
||||
opened by <function>zip_open</function>.
|
||||
</para>
|
||||
<para>
|
||||
Returns a directory entry resource for later use with the
|
||||
<function>zip_entry_...</function> functions.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function>,
|
||||
<function>zip_close</function>,
|
||||
<function>zip_entry_open</function> and
|
||||
<function>zip_entry_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
</reference>
|
||||
<refentry id="function.zip-entry-compressedsize">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_compressedsize</refname>
|
||||
<refpurpose>Retrieve the Compressed Size of a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int
|
||||
<function>zip_entry_compressedsize</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the compressed size of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-compressionmethod">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_compressionmethod</refname>
|
||||
<refpurpose>
|
||||
Retrieve the Compression Method of a Directory Entry
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string
|
||||
<function>zip_entry_compressionmethod</function>
|
||||
</funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the compression method of the directory entry specified
|
||||
by <parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-filesize">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_filesize</refname>
|
||||
<refpurpose>
|
||||
Retrieve the Actual File Size of a Directory Entry
|
||||
</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>int <function>zip_entry_filesize</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the actual size of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-name">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_name</refname>
|
||||
<refpurpose>Retrieve the Name of a Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>zip_entry_name</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Returns the name of the directory entry specified by
|
||||
<parameter>zip_entry</parameter>. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function> and
|
||||
<function>zip_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-open">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_open</refname>
|
||||
<refpurpose>Open a Directory Entry for Reading</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>bool <function>zip_entry_open</function></funcdef>
|
||||
<paramdef>resource <parameter>zip</parameter></paramdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
<paramdef>string
|
||||
<parameter><optional>mode</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Opens a directory entry in a zip file for reading. The parameter
|
||||
<parameter>zip</parameter> is a valid resource handle returned by
|
||||
<function>zip_open</function>. The parameter
|
||||
<parameter>zip_entry</parameter> is a directory entry resource
|
||||
returned by <function>zip_read</function>. The optional
|
||||
parameter <parameter>mode</parameter> can be any of the modes
|
||||
specified in the documentaion for <function>fopen</function>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Currently, <parameter>mode</parameter> is ignored and is always
|
||||
<literal>"rb"</literal>. This is due to the fact that zip
|
||||
support in PHP is read only access. Please see
|
||||
<function>fopen</function> for an explanation of various modes,
|
||||
including <literal>"rb"</literal>.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Returns &true; on succes or &false; on failure.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
Unlike <function>fopen</function> and other similar functions,
|
||||
the return value of <function>zip_entry_open</function> only
|
||||
indicates the result of the operation and is not needed for
|
||||
reading or closing the directory entry.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
See also <function>zip_entry_read</function> and
|
||||
<function>zip_entry_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-entry-read">
|
||||
<refnamediv>
|
||||
<refname>zip_entry_read</refname>
|
||||
<refpurpose>Read From an Open Directory Entry</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>string <function>zip_entry_read</function></funcdef>
|
||||
<paramdef>resource <parameter>zip_entry</parameter></paramdef>
|
||||
<paramdef>int
|
||||
<parameter><optional>length</optional></parameter>
|
||||
</paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Reads up to <parameter>length</parameter> bytes from an open
|
||||
directory entry. If <parameter>length</parameter> is not
|
||||
specified, then <function>zip_entry_read</function> will attempt
|
||||
to read 1024 bytes. The parameter
|
||||
<parameter>zip_entry</parameter> is a valid directory entry
|
||||
returned by <function>zip_read</function>.
|
||||
</para>
|
||||
<note>
|
||||
<para>
|
||||
The <parameter>length</parameter> parameter should be the
|
||||
uncompressed length you wish to read.
|
||||
</para>
|
||||
</note>
|
||||
<para>
|
||||
Returns the data read, or &false; if the end of the file is
|
||||
reached.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_entry_open</function>,
|
||||
<function>zip_entry_close</function> and
|
||||
<function>zip_entry_filesize</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-open">
|
||||
<refnamediv>
|
||||
<refname>zip_open</refname>
|
||||
<refpurpose>Open a Zip File Archive</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>resource <function>zip_open</function></funcdef>
|
||||
<paramdef>string <parameter>filename</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Opens a new zip archive for reading. The
|
||||
<parameter>filename</parameter> parameter is the filename of the
|
||||
zip archive to open.
|
||||
</para>
|
||||
<para>
|
||||
Returns a resource handle for later use with
|
||||
<function>zip_read</function> and <function>zip_close</function>
|
||||
or returns &false; if <parameter>filename</parameter> does not
|
||||
exist.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_read</function> and
|
||||
<function>zip_close</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
<refentry id="function.zip-read">
|
||||
<refnamediv>
|
||||
<refname>zip_read</refname>
|
||||
<refpurpose>Read Next Entry in a Zip File Archive</refpurpose>
|
||||
</refnamediv>
|
||||
<refsect1>
|
||||
<title>Description</title>
|
||||
<funcsynopsis>
|
||||
<funcprototype>
|
||||
<funcdef>resource <function>zip_read</function></funcdef>
|
||||
<paramdef>resource <parameter>zip</parameter></paramdef>
|
||||
</funcprototype>
|
||||
</funcsynopsis>
|
||||
<para>
|
||||
Reads the next entry in a zip file archive. The parameter
|
||||
<parameter>zip</parameter> must be a zip archive previously
|
||||
opened by <function>zip_open</function>.
|
||||
</para>
|
||||
<para>
|
||||
Returns a directory entry resource for later use with the
|
||||
<function>zip_entry_...</function> functions.
|
||||
</para>
|
||||
<para>
|
||||
See also <function>zip_open</function>,
|
||||
<function>zip_close</function>,
|
||||
<function>zip_entry_open</function>, and
|
||||
<function>zip_entry_read</function>.
|
||||
</para>
|
||||
</refsect1>
|
||||
</refentry>
|
||||
|
||||
</reference>
|
||||
|
||||
<!-- Keep this comment at the end of the file
|
||||
Local variables:
|
||||
|
|
Loading…
Reference in a new issue