PHP Zip İşlevleri
PHP Zip Girişi
Zip dosyaları işlevleri, ZIP dosyalarını okumanıza olanak tanır.
Gereksinimler
ZIP uzantısı libzip gerektirir .
Kurulum
Linux Sistemleri
Bu işlevlerin çalışması için PHP'yi --enable-zip ile derlemeniz gerekir.
PHP 5.6: Bir sistem libzip kurulumunu kullanmak için --with-libzip=DIR yapılandırma seçeneğini kullanın. libzip sürüm 0.11 gereklidir, 0.11.2 veya üstü önerilir.
PHP 7.3: Paketlenmiş libzip'e karşı yapı oluşturmak önerilmez, ancak yapılandırmaya --without-libzip eklenerek yine de mümkündür.
Windows Sistemleri
PHP 5.3'ten önce: Bu işlevlerin çalışması için kullanıcıların "php.ini" içinde "php_zip.dll"yi etkinleştirmeleri gerekir.
PHP 5.3'ten itibaren: ZIP uzantısı yerleşiktir.
PHP Zip İşlevleri
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 |