預定義常量

下列常量由此擴展定義,且僅在此擴展編譯入 PHP 或在運行時動態(tài)載入時可用。

ZipArchive 使用的類常量。 有以下三類常量:Flags(以 FL_ 為前綴),errors(以 ER_ 為前綴)以及 mode(沒有前綴)。

ZIPARCHIVE::CREATE (integer)
如果不存在則創(chuàng)建一個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)
對壓縮包執(zhí)行額外的一致性檢查,如果失敗則顯示錯誤。
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)
創(chuàng)建臨時文件失敗
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.
Operating system constants for external attributes
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