Fungsi Zip PHP
Pengenalan Zip PHP
Fungsi file Zip memungkinkan Anda membaca file ZIP.
Persyaratan
Ekstensi ZIP memerlukan libzip .
Instalasi
Sistem Linux
Agar fungsi-fungsi ini berfungsi, Anda harus mengkompilasi PHP dengan --enable-zip.
PHP 5.6: Gunakan opsi --with-libzip=DIR configure untuk menggunakan instalasi libzip sistem. libzip versi 0.11 diperlukan, dengan 0.11.2 atau lebih baru direkomendasikan.
PHP 7.3: Membangun terhadap libzip yang dibundel tidak disarankan, tetapi masih memungkinkan dengan menambahkan --tanpa-libzip ke konfigurasi.
Sistem Windows
Sebelum PHP 5.3: Pengguna harus mengaktifkan "php_zip.dll" di dalam "php.ini" agar fungsi ini berfungsi.
Dari PHP 5.3: Ekstensi ZIP sudah ada di dalamnya.
Fungsi Zip PHP
Function | Description |
---|---|
zip_close() | Closes a ZIP file archive |
zip_entry_close() | Closes a ZIP directory entry |
zip_entry_compressedsize() | Returns the compressed file size of a ZIP directory entry |
zip_entry_compressionmethod() | Returns the compression method of a ZIP directory entry |
zip_entry_filesize() | Returns the actual file size of a ZIP directory entry |
zip_entry_name() | Returns the name of a ZIP directory entry |
zip_entry_open() | Opens a directory entry in a ZIP file for reading |
zip_entry_read() | Reads from an open directory entry in the ZIP file |
zip_open() | Opens a ZIP file archive |
zip_read() | Reads the next file in a open ZIP file archive |