ZipArchive
PHP Manual

ZipArchive::setPassword

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

ZipArchive::setPasswordSet the password for the active archive

Description

public bool ZipArchive::setPassword ( string $password )

Sets the password for the active archive.

Parameters

password

The password to add to the archive.

Return Values

Returns TRUE on success or FALSE on failure.


ZipArchive
PHP Manual