Php/docs/zip.constants
预定义常量
下列常量由此扩展定义,且仅在此扩展编译入 PHP 或在运行时动态载入时可用。
ZipArchive 使用的类常量。
有以下三类常量:Flags(以 FL_
为前缀),errors(以
ER_
为前缀)以及 mode(没有前缀)。
ZIPARCHIVE::CREATE
(integer)- 如果不存在则创建一个zip压缩包。
ZIPARCHIVE::OVERWRITE
(integer)- 总是以一个新的压缩包开始,此模式下如果已经存在则会被覆盖。
ZIPARCHIVE::EXCL
(integer)- 如果压缩包已经存在,则出错。
ZipArchive::RDONLY
(integer)- 只读模式打开压缩包。 Available as of PHP 7.4.3 and PECL zip 1.17.1, respectively, if built against libzip ≥ 1.0.0.
ZIPARCHIVE::CHECKCONS
(integer)- 对压缩包执行额外的一致性检查,如果失败则显示错误。
ZIPARCHIVE::FL_NOCASE
(integer)- 查找时忽略名称的大小写。
ZIPARCHIVE::FL_NODIR
(integer)- 忽略目录部分
ZIPARCHIVE::FL_COMPRESSED
(integer)- 读取压缩数据
ZIPARCHIVE::FL_UNCHANGED
(integer)- 使用原始数据,忽略更改。
ZipArchive::FL_RECOMPRESS
(integer)- 强制重新压缩数据。 PHP 8.0.0 和 PECL zip 1.18.0 起可以使用。
ZipArchive::FL_ENCRYPTED
(integer)- Read encrypted data (implies FL_COMPRESSED). Available as of PHP 8.0.0 and PECL zip 1.18.0.
ZipArchive::FL_OVERWRITE
(integer)- If file with name exists, overwrite (replace) it. Available as of PHP 8.0.0 and PECL zip 1.18.0.
ZipArchive::FL_LOCAL
(integer)- In local header. Available as of PHP 8.0.0 and PECL zip 1.18.0.
ZipArchive::ZIP_FL_CENTRAL
(integer)- In central directory. Available as of PHP 8.0.0 and PECL zip 1.18.0.
ZipArchive::FL_ENC_GUESS
(integer)- Guess string encoding (is default). Available as of PHP 7.0.8.
ZipArchive::FL_ENC_RAW
(integer)- Get unmodified string. Available as of PHP 7.0.8.
ZipArchive::FL_ENC_STRICT
(integer)- Follow specification strictly. Available as of PHP 7.0.8.
ZipArchive::FL_ENC_UTF_8
(integer)- String is UTF-8 encoded. Available as of PHP 7.0.8.
ZipArchive::FL_ENC_CP437
(integer)- String is CP437 encoded. Available as of PHP 7.0.8.
ZIPARCHIVE::CM_DEFAULT
(integer)- 更好的压缩或存储。
ZIPARCHIVE::CM_STORE
(integer)- 存储(不压缩)。
ZIPARCHIVE::CM_SHRINK
(integer)- 收缩
ZIPARCHIVE::CM_REDUCE_1
(integer)- 用因子1换算
ZIPARCHIVE::CM_REDUCE_2
(integer)- 用因子2换算
ZIPARCHIVE::CM_REDUCE_3
(integer)- 用因子3换算
ZIPARCHIVE::CM_REDUCE_4
(integer)- 用因子4换算
ZIPARCHIVE::CM_IMPLODE
(integer)- 聚爆
ZIPARCHIVE::CM_DEFLATE
(integer)- deflated
ZIPARCHIVE::CM_DEFLATE64
(integer)- deflate64
ZIPARCHIVE::CM_PKWARE_IMPLODE
(integer)- PKWARE imploding
ZIPARCHIVE::CM_BZIP2
(integer)- BZIP2算法
ZipArchive::CM_LZMA
(integer)- LZMA 算法
ZipArchive::CM_LZMA2
(integer)- LZMA2 algorithm. Available as of PHP 7.4.3 and PECL zip 1.16.0, respectively, if built against libzip ≥ 1.6.0.
ZipArchive::CM_XZ
(integer)- XZ algorithm. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively, if built against libzip ≥ 1.6.0.
ZIPARCHIVE::ER_OK
(integer)- 没有错误。
ZIPARCHIVE::ER_MULTIDISK
(integer)- 不支持多磁盘zip压缩包。
ZIPARCHIVE::ER_RENAME
(integer)- 重命名临时文件失败。
ZIPARCHIVE::ER_CLOSE
(integer)- 关闭zip压缩包失败。
ZIPARCHIVE::ER_SEEK
(integer)- 寻址错误
ZIPARCHIVE::ER_READ
(integer)- 读取错误
ZIPARCHIVE::ER_WRITE
(integer)- 写入错误
ZIPARCHIVE::ER_CRC
(integer)- CRC校验失败
ZIPARCHIVE::ER_ZIPCLOSED
(integer)- zip压缩包已关闭
ZIPARCHIVE::ER_NOENT
(integer)- 没有文件
ZIPARCHIVE::ER_EXISTS
(integer)- 文件已经存在
ZIPARCHIVE::ER_OPEN
(integer)- 不能打开文件
ZIPARCHIVE::ER_TMPOPEN
(integer)- 创建临时文件失败
ZIPARCHIVE::ER_ZLIB
(integer)- Zlib错误
ZIPARCHIVE::ER_MEMORY
(integer)- 内存分配失败
ZIPARCHIVE::ER_CHANGED
(string)- 条目已被改变
ZIPARCHIVE::ER_COMPNOTSUPP
(integer)- 不支持的压缩方式
ZIPARCHIVE::ER_EOF
(integer)- 过早的EOF
ZIPARCHIVE::ER_INVAL
(integer)- 无效的参数
ZIPARCHIVE::ER_NOZIP
(integer)- 不是一个zip压缩包
ZIPARCHIVE::ER_INTERNAL
(integer)- 内部错误(Internal error)
ZIPARCHIVE::ER_INCONS
(integer)- Zip压缩包不一致
ZIPARCHIVE::ER_REMOVE
(integer)- 不能移除文件
ZIPARCHIVE::ER_DELETED
(integer)- 条目已被删除
ZipArchive::ER_ENCRNOTSUPP
(integer)- 不支持的压缩方式。 PHP 7.4.3 和 PECL zip 1.16.1 起可用。
ZipArchive::ER_RDONLY
(integer)- Read-only archive. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively.
ZipArchive::ER_NOPASSWD
(integer)- No password provided. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively.
ZipArchive::ER_WRONGPASSWD
(integer)- Wrong password provided. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively.
ZipArchive::ZIP_ER_OPNOTSUPP
(integer)- Operation not supported. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively, if built against libzip ≥ 1.0.0.
ZipArchive::ZIP_ER_INUSE
(integer)- Resource still in use. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively, if built against libzip ≥ 1.0.0.
ZipArchive::ZIP_ER_TELL
(integer)- Tell error. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively, if built against libzip ≥ 1.0.0.
ZipArchive::ZIP_ER_COMPRESSED_DATA
(integer)- Compressed data invalid. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively, if built against libzip ≥ 1.6.0.
ZipArchive::ER_CANCELLED
(integer)- Operation cancelled. Available as of PHP 7.4.3 and PECL zip 1.16.1, respectively, if built against libzip ≥ 1.6.0.
ZipArchive::EM_NONE
(integer)- No encryption, since PHP 7.2.0, PECL zip 1.14.0
ZipArchive::EM_AES_128
(integer)- AES 128 encryption, since PHP 7.2.0, PECL zip 1.14.0
ZipArchive::EM_AES_192
(integer)- AES 1192 encryption, since PHP 7.2.0, PECL zip 1.14.0
ZipArchive::EM_AES_256
(integer)- AES 256 encryption, since PHP 7.2.0, PECL zip 1.14.0
ZipArchive::LIBZIP_VERSION
(string)- Zip library version. Available as of PHP 7.4.3 and PECL zip 1.16.0.
ZipArchive::OPSYS_DOS
(integer)
ZipArchive::OPSYS_AMIGA
(integer)
ZipArchive::OPSYS_OPENVMS
(integer)
ZipArchive::OPSYS_UNIX
(integer)
ZipArchive::OPSYS_VM_CMS
(integer)
ZipArchive::OPSYS_ATARI_ST
(integer)
ZipArchive::OPSYS_OS_2
(integer)
ZipArchive::OPSYS_MACINTOSH
(integer)
ZipArchive::OPSYS_Z_SYSTEM
(integer)
ZipArchive::OPSYS_CPM
(integer)
ZipArchive::OPSYS_WINDOWS_NTFS
(integer)
ZipArchive::OPSYS_MVS
(integer)
ZipArchive::OPSYS_VSE
(integer)
ZipArchive::OPSYS_ACORN_RISC
(integer)
ZipArchive::OPSYS_VFAT
(integer)
ZipArchive::OPSYS_ALTERNATE_MVS
(integer)
ZipArchive::OPSYS_BEOS
(integer)
ZipArchive::OPSYS_TANDEM
(integer)
ZipArchive::OPSYS_OS_400
(integer)
ZipArchive::OPSYS_OS_X
(integer)
ZipArchive::OPSYS_DEFAULT
(integer)
- Since PHP 5.6.0, PECL zip 1.12.4