mirror of
https://github.com/php/doc-de.git
synced 2026-03-29 18:52:13 +02:00
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@84242 c90b9560-bf6c-de11-be94-00142212c4b1
105 lines
2.9 KiB
XML
105 lines
2.9 KiB
XML
<?xml version="1.0" encoding="iso-8859-1"?>
|
|
<!-- $Revision: 1.3 $ -->
|
|
<reference id="ref.zip">
|
|
<title>ZIP Funktionen (Lesezugriff)</title>
|
|
<titleabbrev>Zip</titleabbrev>
|
|
|
|
<partintro>
|
|
<para>
|
|
Dieses Modul benutzt die Funktionen der <ulink
|
|
url="&url.zziplib;">ZZIPlib</ulink> Bibliothek von Guido Draheim
|
|
um ZIP komprimierte Archive und die darin enthaltenen Dateien zu
|
|
lesen.
|
|
</para>
|
|
<para>
|
|
Zu beachten ist, dass ZZIPlib nur eine Untermenge der Funktionen
|
|
zur Verfügung stellt, die in einer vollständigen Implementation
|
|
des ZIP Algorithmus vorhanden sind. Zur Erstellung eines ZIP
|
|
Archivs muss man sich eines der üblichen ZIP Programme bedienen.
|
|
</para>
|
|
<para>
|
|
Die ZIP Unterstützung ist standardmäßig nicht aktiviert. Um die
|
|
ZIP Funktionen nutzen zu können, muss PHP mit der option <link
|
|
linkend="install.configure.with-zip">--with-zip</link> kompiliert
|
|
werden. Das ZIP Modul benötigt ZZIPlib version >= 0.10.6.
|
|
</para>
|
|
<note>
|
|
<para>
|
|
Zip Unterstützung für PHP vor Version 4.1.0 ist als experimentell
|
|
anzusehen. Dieser Abschnitt beschreibt die ZIP Unterstützung,
|
|
wie sie für PHP ab Version 4.1.0 existiert.
|
|
</para>
|
|
</note>
|
|
|
|
<section id="zip-example">
|
|
<title>Beispiel zur Verwendung</title>
|
|
<para>
|
|
Dieses Beispiel öffnet ein ein ZIP Archiv, liest jede Datei
|
|
innerhalb des Archivs und gibt den Inhalt zurück. Das
|
|
<filename>test2.zip</filename> Archiv, das in diesem Beispiel
|
|
benutzt wird, wird mit der Original Distribution der ZZIPlib
|
|
Bibliothek mitgeliefert.
|
|
</para>
|
|
<example>
|
|
<title>Beispiel zur Verwendung der Zip Funktion</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
|
|
$zip = zip_open("/tmp/test2.zip");
|
|
|
|
if ($zip) {
|
|
|
|
while ($zip_entry = zip_read($zip)) {
|
|
echo "Name: " . zip_entry_name($zip_entry) . "\n";
|
|
echo "Actual Filesize: " . zip_entry_filesize($zip_entry) . "\n";
|
|
echo "Compressed Size: " . zip_entry_compressedsize($zip_entry) . "\n";
|
|
echo "Compression Method: " . zip_entry_compressionmethod($zip_entry) . "\n";
|
|
|
|
if (zip_entry_open($zip, $zip_entry, "r")) {
|
|
echo "File Contents:\n";
|
|
$buf = zip_entry_read($zip_entry, zip_entry_filesize($zip_entry));
|
|
echo "$buf\n";
|
|
|
|
zip_entry_close($zip_entry);
|
|
}
|
|
echo "\n";
|
|
|
|
}
|
|
|
|
zip_close($zip);
|
|
|
|
}
|
|
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
</example>
|
|
</section>
|
|
</partintro>
|
|
|
|
&reference.zip.functions;
|
|
|
|
</reference>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"../../../manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|
|
|