पीएचपी ज़िप कार्य
पीएचपी ज़िप परिचय
ज़िप फ़ाइलें फ़ंक्शन आपको ज़िप फ़ाइलों को पढ़ने की अनुमति देता है।
आवश्यकताएं
ज़िप एक्सटेंशन के लिए libzip की आवश्यकता होती है ।
इंस्टालेशन
लिनक्स सिस्टम
इन कार्यों के काम करने के लिए, आपको PHP को --enable-zip के साथ संकलित करना होगा।
PHP 5.6: सिस्टम libzip संस्थापन का उपयोग करने के लिए --with-libzip=DIR कॉन्फ़िगर विकल्प का उपयोग करें । libzip संस्करण 0.11 आवश्यक है, 0.11.2 या बाद के संस्करण के साथ अनुशंसित।
PHP 7.3: बंडल किए गए libzip के विरुद्ध निर्माण को हतोत्साहित किया जाता है, लेकिन कॉन्फ़िगरेशन में --with-libzip जोड़कर अभी भी संभव है।
विंडोज सिस्टम
PHP 5.3 से पहले: इन कार्यों के काम करने के लिए उपयोगकर्ताओं को "php.ini" के अंदर "php_zip.dll" को सक्षम करना होगा।
PHP 5.3 से: ज़िप एक्सटेंशन बिल्ट-इन है।
पीएचपी ज़िप कार्य
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 |