= 7.2.0, PHP 8, PECL zip >= 1.14.0)ZipArchive::setEncryptionIndex — Set the encryption method of an entry defined ">

ZipArchive::setEncryptionIndex

(PHP >= 7.2.0, PHP 8, PECL zip >= 1.14.0)

ZipArchive::setEncryptionIndexSet the encryption method of an entry defined by its index

說(shuō)明

public ZipArchive::setEncryptionIndex(int $index, int $method, ?string $password = null): bool

Set the encryption method of an entry defined by its index.

參數(shù)

index

Index of the entry.

method

The encryption method defined by one of the ZipArchive::EM_ constants.

password

Optional password, default used when missing.

返回值

成功時(shí)返回 true, 或者在失敗時(shí)返回 false。

更新日志

版本 說(shuō)明
8.0.0 password is now nullable.

注釋

注意:

This function is only available if built against libzip ≥ 1.2.0.

參見(jiàn)