ZipArchive
PHP Manual

ZipArchive::setPassword

(PHP 5 >= 5.6.0, PHP 7, PECL zip >= 1.12.4)

ZipArchive::setPasswordSet the password for the active archive

説明

public bool ZipArchive::setPassword ( string $password )

Sets the password for the active archive.

パラメータ

password

The password to be used for the archive.

返り値

成功した場合に TRUE を、失敗した場合に FALSE を返します。

注意

注意:

This function only sets the password to be used to decompress the archive; it does not turn a non-password-protected ZipArchive into a password-protected ZipArchive.


ZipArchive
PHP Manual