PHP Zip File 函数
通过 PHP 中的相关函数,你可以实现 zip 文件的解压缩操作!
PHP Zip File 简介
Zip File 函数允许您读取压缩文件。
安装
如需在服务器上运行 Zip File 函数,必须安装这些库:
- Guido Draheim 的 ZZIPlib 库: 下载 ZZIPlib 库
- Zip PELC 扩展:下载 Zip PELC 扩展
在 Linux 系统上安装
PHP 5+:Zip 函数和 Zip 库默认不会启用,必须从上面的链接下载。请使用 --with-zip=DIR 配置选项来包含 Zip 支持。
在 Windows 系统上安装
PHP 5+:Zip 函数默认不会启用,必须从上面的链接下载 php_zip.dll 和 ZZIPlib 库。必须在 php.ini 中启用 php_zip.dll。
如需启用任何 PHP 扩展,PHP extension_dir 设置(在 php.ini 文件中)应该设置为该 PHP 扩展所在的目录。举例 extension_dir 的值可能是 c:\php\ext。
PHP Zip File 函数
PHP:指示支持该函数的最早的 PHP 版本。
| 函数 | 描述 | PHP |
|---|---|---|
| zip_close() | 关闭 ZIP 文件。 | 4 |
| zip_entry_close() | 关闭 ZIP 文件中的一个项目。 | 4 |
| zip_entry_compressedsize() | 返回 ZIP 文件中的一个项目的被压缩尺寸。 | 4 |
| zip_entry_compressionmethod() | 返回 ZIP 文件中的一个项目的压缩方法。 | 4 |
| zip_entry_filesize() | 返回 ZIP 文件中的一个项目的实际文件尺寸。 | 4 |
| zip_entry_name() | 返回 ZIP 文件中的一个项目的名称。 | 4 |
| zip_entry_open() | 打开 ZIP 文件中的一个项目以供读取。 | 4 |
| zip_entry_read() | 读取 ZIP 文件中的一个打开的项目。 | 4 |
| zip_open() | 打开 ZIP 文件。 | 4 |
| zip_read() | 读取 ZIP 文件中的下一个项目。 | 4 |
PHP Zip File 常量
在 PHP Zip File 函数中没有相关的常量。
PHP Zip File 函数的更多相关文章
- PHP Zip File
安装 如需在服务器上运行 Zip File 函数,必须安装这些库: Guido Draheim 的 ZZIPlib 库: 下载 ZZIPlib 库 Zip PELC 扩展:下载 Zip PELC 扩展 ...
- 记一个mvn奇怪错误: Archive for required library: 'D:/mvn/repos/junit/junit/3.8.1/junit-3.8.1.jar' in project 'xxx' cannot be read or is not a valid ZIP file
我的maven 项目有一个红色感叹号, 而且Problems 存在 errors : Description Resource Path Location Type Archive for requi ...
- linux下解压大于4G文件提示error: Zip file too big错误的解决办法
error: Zip file too big (greater than 4294959102 bytes)错误解决办法.zip文件夹大于4GB,在centos下无法正常unzip,需要使用第三方工 ...
- php使用file函数、fseek函数读取大文件效率分析
php读取大文件可以使用file函数和fseek函数,但是二者之间效率可能存在差异,本文章向大家介绍php file函数与fseek函数实现大文件读取效率对比分析,需要的朋友可以参考一下. 1. 直接 ...
- maven install 读取jar包时出错;error in opening zip file
错误信息: [INFO] ------------------------------------------------------------------------ [ERROR] Failed ...
- error in opening zip file 1 错误
项目部署服务启动时会出现: error in opening zip file 1 错误 原来是不同服务器编译过的jar包直接下载后发布有问题,重新上传本地编译好的lib下面的jar包后,启动服务,正 ...
- maven时候Embedded error: error in opening zip file
maven时候Embedded error: error in opening zip file 用 mvn clean install -Dmaven.test.skip=true -Denv=re ...
- PHP 文件读取 fread、fgets、fgetc、file_get_contents 与 file 函数
fread().fgets().fgetc().file_get_contents() 与 file() 函数用于从文件中读取内容. fread() fread() 函数用于读取文件(可安全用于二进制 ...
- Java ZIP File Example---refernce
In this tutorial we are going to see how to ZIP a file in Java. ZIP is an archive file format that e ...
随机推荐
- Python 生成随机验证码
Python生成随机验证码 Python生成随机验证码,需要使用PIL模块. 安装: 1 pip3 install pillow 基本使用 1. 创建图片 1 2 3 4 5 6 7 8 9 fro ...
- Git篇(基础)
安装过程省略... 至于安装目录的有关功能,略过... 一.关于初次使用的关键配置命令: 1.配置基本信息,该信息将保存在该用户目录下的.gitconfig文件内 配置用户信息$ git config ...
- [LeetCode] Special Binary String 特殊的二进制字符串
Special binary strings are binary strings with the following two properties: The number of 0's is eq ...
- [LeetCode] Valid Palindrome II 验证回文字符串之二
Given a non-empty string s, you may delete at most one character. Judge whether you can make it a pa ...
- mybatis学习成长之路(一)
从小白开始学习,希望自己学习的过程可以帮助更多需要的人,参考网址:https://www.cnblogs.com/ysocean/p/7237499.html 1.mybatis的jar包下载地址:h ...
- LeetCode题目----求中位数---标签:Array
题目难度---困难 题目要求: 给定两个大小为 m 和 n 的有序数组 nums1 和 nums2 . 请找出这两个有序数组的中位数.要求算法的时间复杂度为 O(log (m+n)) . 思路:第一眼 ...
- Spring官方文档翻译(转)
http://blog.csdn.net/tangtong1/article/details/51326887 http://blog.csdn.net/tangtong1/article/detai ...
- epoll源码分析(转)
在create后会创建eventpoll对象保存在一个匿名fd的file struct的private指针中,然后进程睡在等待队列上面. 对于等待的fd,通过poll机制在准备好之后会调用相应的cal ...
- ●BZOJ 2693 jzptab
题链: http://www.lydsy.com/JudgeOnline/problem.php?id=2693 题解: 莫比乌斯反演 先看看这个题,BZOJ 2154 Crash的数字表格,本题的升 ...
- hihocoder 1391 树状数组
#1391 : Countries 时间限制:1000ms 单点时限:1000ms 内存限制:256MB 描述 There are two antagonistic countries, countr ...