array ( 0 => 'index.php', 1 => 'PHP Manual', ), 'head' => array ( 0 => 'UTF-8', 1 => 'de', ), 'this' => array ( 0 => 'context.zip.php', 1 => 'Zip-Kontextoptionen', ), 'up' => array ( 0 => 'context.php', 1 => 'Kontextoptionen und -parameter', ), 'prev' => array ( 0 => 'context.params.php', 1 => 'Kontextparameter', ), 'next' => array ( 0 => 'context.zlib.php', 1 => 'Zlib-Kontextoptionen', ), 'alternatives' => array ( ), 'source' => array ( 'lang' => 'de', 'path' => 'language/context/zip.xml', ), ); $setup["toc"] = $TOC; $setup["toc_deprecated"] = $TOC_DEPRECATED; $setup["parents"] = $PARENTS; manual_setup($setup); ?>
Zip-Kontextoptionen — Liste der Zip-Kontextoptionen
Die Zip-Kontextoptionen sind für zip
-Wrapper verfügbar.
Version | Beschreibung |
---|---|
PHP 7.2.0, PECL zip 1.14.0 |
password wurde hinzugefügt.
|
Beispiel #1 Grundlegendes Beispiel für die Verwendung von password
<?php
// Verschlüsseltes Archiv lesen
$opts = array(
'zip' => array(
'password' => 'secret',
),
);
// den Kontext erstellen...
$context = stream_context_create($opts);
// ...und ihn zum Abrufen der Daten verwenden
echo file_get_contents('zip://test.zip#test.txt', false, $context);
?>