Constantes pré-définies

Ces constantes sont définies par cette extension, et ne sont disponibles que si cette extension a été compilée avec PHP, ou bien chargée au moment de l'exécution.

ZipArchive utilise des constantes de classe. Il y a trois types de constantes : les options (préfixées par FL_), les erreurs (préfixées par ER_) ou les modes (sans préfixe).

ZipArchive::CREATE (entier)
Crée l'archive si elle n'existe pas.
ZipArchive::OVERWRITE (entier)
Si l'archivage existe, ignorer son contenu actuel. En d'autres termes, gérer de la même manière qu'une archive vide.
ZipArchive::EXCL (entier)
Erreur si l'archive existe déjà.
ZipArchive::CHECKCONS (entier)
Effectue des analyses supplémentaires de cohérence et émet une erreur si elles échouent.
ZipArchive::FL_NOCASE (entier)
Ignore la casse sur le nom.
ZipArchive::FL_NODIR (entier)
Ignore le composant dossier.
ZipArchive::FL_COMPRESSED (entier)
Lit les données compressées.
ZipArchive::FL_UNCHANGED (entier)
Utilise les données originales, en ignorant les modifications.
ZipArchive::FL_ENC_GUESS (integer)
Devine l'encodage de la chaîne (par défaut). Disponible depuis PHP 7.0.8.
ZipArchive::FL_ENC_RAW (integer)
Récupère la chaîne non modifiée. Disponible depuis PHP 7.0.8.
ZipArchive::FL_ENC_STRICT (integer)
Suit les spécifications strictement. Disponible depuis PHP 7.0.8.
ZipArchive::FL_ENC_UTF_8 (integer)
La chaîne est encodée UTF-8. Disponible depuis PHP 7.0.8.
ZipArchive::FL_ENC_CP437 (integer)
La chaîne est encodée CP437. Disponible depuis PHP 7.0.8.
ZipArchive::CM_DEFAULT (entier)
Meilleur compression ou stockage.
ZipArchive::CM_STORE (entier)
Stocké (non-compressé).
ZipArchive::CM_SHRINK (entier)
Retrait.
ZipArchive::CM_REDUCE_1 (entier)
Réduit de facteur 1.
ZipArchive::CM_REDUCE_2 (entier)
Réduit de facteur 2.
ZipArchive::CM_REDUCE_3 (entier)
Réduit de facteur 3.
ZipArchive::CM_REDUCE_4 (entier)
Réduit de facteur 4.
ZipArchive::CM_IMPLODE (entier)
Réunit.
ZipArchive::CM_DEFLATE (entier)
Compression.
ZipArchive::CM_DEFLATE64 (entier)
Compression 64.
ZipArchive::CM_PKWARE_IMPLODE (entier)
Réunit PKWARE.
ZipArchive::CM_BZIP2 (entier)
Algorithme BZIP2.
ZipArchive::ER_OK (entier)
Aucune erreur.
ZipArchive::ER_MULTIDISK (entier)
Archives ZIP multidisques non supportées.
ZipArchive::ER_RENAME (entier)
Échec du changement de nom du fichier temporaire.
ZipArchive::ER_CLOSE (entier)
Échec de la fermeture de l'archive ZIP.
ZipArchive::ER_SEEK (entier)
Erreur de pointeur.
ZipArchive::ER_READ (entier)
Erreur de lecture.
ZipArchive::ER_WRITE (entier)
Erreur d'écriture.
ZipArchive::ER_CRC (entier)
Erreur CRC.
ZipArchive::ER_ZIPCLOSED (entier)
Archive ZIP fermée.
ZipArchive::ER_NOENT (entier)
Le fichier n'existe pas.
ZipArchive::ER_EXISTS (entier)
Le fichier existe déjà.
ZipArchive::ER_OPEN (entier)
Impossible d'ouvrir le fichier.
ZipArchive::ER_TMPOPEN (entier)
Échec lors de la création du fichier temporaire.
ZipArchive::ER_ZLIB (entier)
Erreur Zlib.
ZipArchive::ER_MEMORY (entier)
Échec d'allocation mémoire.
ZipArchive::ER_CHANGED (chaîne de caractères)
L'entrée a été modifiée.
ZipArchive::ER_COMPNOTSUPP (entier)
Méthode de compression non supportée.
ZipArchive::ER_EOF (entier)
EOF prématuré.
ZipArchive::ER_INVAL (entier)
Argument invalide.
ZipArchive::ER_NOZIP (entier)
Ce n'est pas une archive ZIP.
ZipArchive::ER_INTERNAL (entier)
erreur interne
ZipArchive::ER_INCONS (entier)
Archive ZIP incohérente.
ZipArchive::ER_REMOVE (entier)
Impossible d'effacer le fichier.
ZipArchive::ER_DELETED (entier)
L'entrée a été supprimée.
ZipArchive::EM_NONE (entier)
Aucun chiffrement, depuis PHP 7.2.0, PECL zip 1.14.0
ZipArchive::EM_AES_128 (entier)
Chiffrement AES 128, depuis PHP 7.2.0, PECL zip 1.14.0
ZipArchive::EM_AES_192 (entier)
Chiffrement AES 1192, depuis PHP 7.2.0, PECL zip 1.14.0
ZipArchive::EM_AES_256 (entier)
Chiffrement AES 256, depuis PHP 7.2.0, PECL zip 1.14.0
Système d'exploitation, constantes pour les attributs étendus
ZipArchive::OPSYS_DOS (entier)
ZipArchive::OPSYS_AMIGA (entier)
ZipArchive::OPSYS_OPENVMS (entier)
ZipArchive::OPSYS_UNIX (entier)
ZipArchive::OPSYS_VM_CMS (entier)
ZipArchive::OPSYS_ATARI_ST (entier)
ZipArchive::OPSYS_OS_2 (entier)
ZipArchive::OPSYS_MACINTOSH (entier)
ZipArchive::OPSYS_Z_SYSTEM (entier)
ZipArchive::OPSYS_CPM (entier)
ZipArchive::OPSYS_WINDOWS_NTFS (entier)
ZipArchive::OPSYS_MVS (entier)
ZipArchive::OPSYS_VSE (entier)
ZipArchive::OPSYS_ACORN_RISC (entier)
ZipArchive::OPSYS_VFAT (entier)
ZipArchive::OPSYS_ALTERNATE_MVS (entier)
ZipArchive::OPSYS_BEOS (entier)
ZipArchive::OPSYS_TANDEM (entier)
ZipArchive::OPSYS_OS_400 (entier)
ZipArchive::OPSYS_OS_X (entier)
ZipArchive::OPSYS_DEFAULT (entier)
Depuis PHP 5.6.0, PECL zip 1.12.4