Zip context options

Zip 컨텍스트 옵션 — Zip 컨텍스트 옵션 목록


설명

zip 래퍼에 대해 zip 컨텍스트 옵션을 사용할 수 있습니다.


옵션

    password
    암호화된 아카이브에 사용되는 비밀번호를 지정하는 데 사용됩니다.

변경 로그

Version Description
PHP 7.2.0, PECL zip 1.14.0 Added password.
Examples

예제 #1 기본 비밀번호 사용 예

                  
<?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);

?>