وظائف PHP Zip
مقدمة PHP Zip
تتيح لك وظائف الملفات المضغوطة قراءة ملفات ZIP.
متطلبات
يتطلب امتداد ZIP libzip .
التركيب
أنظمة لينوكس
لكي تعمل هذه الوظائف ، يجب عليك ترجمة PHP باستخدام --enable-zip.
PHP 5.6: استخدم خيار التكوين --with-libzip = DIR لاستخدام تثبيت libzip للنظام. مطلوب إصدار libzip 0.11 ، ويوصى باستخدام 0.11.2 أو أحدث.
PHP 7.3: البناء ضد libzip المجمّع غير محبذ ، لكن لا يزال ممكنًا بإضافة - دون- libzip إلى التكوين.
أنظمة الويندوز
قبل الإصدار 5.3 من PHP: يجب على المستخدمين تمكين "php_zip.dll" داخل "php.ini" حتى تعمل هذه الوظائف.
من PHP 5.3: ملحق ZIP مدمج.
وظائف PHP Zip
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 |