zip

Zip context options

Zip context option listing

ENTITY

Zip context options are available for zip wrappers.

ENTITY

password
Used to specify password used for encrypted archive.

ENTITY

ENTITY ENTITY
7.2.0, PECL zip 1.14.0 Added password.

ENTITY

Basic password usage example

<?php
// Read encrypted archive
$opts = array(
    'zip' => array(
        'password' => 'secret',
    ),
);
// create the context...
$context = stream_context_create($opts);

// ...and use it to fetch the data
echo file_get_contents('zip://test.zip#test.txt', false, $context);

?>

    

版本号 #2
由 壳壳虫 创建于 2026-10-31 17:38:23 UTC
由 壳壳虫 更新于 2026-10-31 17:38:24 UTC