PHP Zip File 函數(shù)
PHP Zip File 函數(shù)
PHP Zip File 簡(jiǎn)介
Zip File 函數(shù)允許您讀取壓縮文件。
安裝
如需在服務(wù)器上運(yùn)行 Zip File 函數(shù),必須安裝這些庫:
- Guido Draheim 的 ZZIPlib 庫: 下載 ZZIPlib 庫
- Zip PELC 擴(kuò)展:下載 Zip PELC 擴(kuò)展
在 Linux 系統(tǒng)上安裝
PHP 5+:Zip 函數(shù)和 Zip 庫默認(rèn)不會(huì)啟用,必須從上面的鏈接下載。請(qǐng)使用 --with-zip=DIR 配置選項(xiàng)來包含 Zip 支持。
在 Windows 系統(tǒng)上安裝
PHP 5+:Zip 函數(shù)默認(rèn)不會(huì)啟用,必須從上面的鏈接下載 php_zip.dll 和 ZZIPlib 庫。必須在 php.ini 中啟用 php_zip.dll。
如需啟用任何 PHP 擴(kuò)展,PHP extension_dir 設(shè)置(在 php.ini 文件中)應(yīng)該設(shè)置為該 PHP 擴(kuò)展所在的目錄。舉例 extension_dir 的值可能是 c:\php\ext。
PHP Zip File 函數(shù)
PHP:指示支持該函數(shù)的最早的 PHP 版本。
函數(shù) | 描述 | PHP |
---|---|---|
zip_close() | 關(guān)閉 ZIP 文件。 | 4 |
zip_entry_close() | 關(guān)閉 ZIP 文件中的一個(gè)項(xiàng)目。 | 4 |
zip_entry_compressedsize() | 返回 ZIP 文件中的一個(gè)項(xiàng)目的被壓縮尺寸。 | 4 |
zip_entry_compressionmethod() | 返回 ZIP 文件中的一個(gè)項(xiàng)目的壓縮方法。 | 4 |
zip_entry_filesize() | 返回 ZIP 文件中的一個(gè)項(xiàng)目的實(shí)際文件尺寸。 | 4 |
zip_entry_name() | 返回 ZIP 文件中的一個(gè)項(xiàng)目的名稱。 | 4 |
zip_entry_open() | 打開 ZIP 文件中的一個(gè)項(xiàng)目以供讀取。 | 4 |
zip_entry_read() | 讀取 ZIP 文件中的一個(gè)打開的項(xiàng)目。 | 4 |
zip_open() | 打開 ZIP 文件。 | 4 |
zip_read() | 讀取 ZIP 文件中的下一個(gè)項(xiàng)目。 | 4 |
PHP Zip File 常量
無。
相關(guān)文章
- PHP 運(yùn)算符
- PHP 數(shù)組
- PHP 異常處理
- PHP JSON
- PHP array_intersect() 函數(shù)
- PHP array_intersect_ukey() 函數(shù)
- PHP array_key_first() 函數(shù)
- PHP array_multisort() 函數(shù)
- PHP array_product() 函數(shù)
- PHP array_reduce() 函數(shù)
- PHP array_udiff() 函數(shù)
- PHP arsort() 函數(shù)
- PHP count() 函數(shù)
- PHP list() 函數(shù)
- PHP natsort() 函數(shù)
- PHP 5 Array 函數(shù)
- PHP 5 Calendar 函數(shù)
- PHP 5 Filesystem 函數(shù)
- PHP FTP 函數(shù)
- PHP PDO