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 ...
随机推荐
- H5 input输入限制最大位数,和调用小键盘需求发生冲突的解决办法
首先,限制输入最大位数时,input有自带的属性maxlength. <input type="text" name="email" maxlength= ...
- 南阳OJ-14-会场安排问题---区间不相交
题目链接: http://acm.nyist.edu.cn/JudgeOnline/problem.php?pid=14 题目描述: 学校的小礼堂每天都会有许多活动,有时间这些活动的计划时间会发生冲突 ...
- 集合(list、set和map)区别
1.List,Set都是继承自Collection接口,Map则不是 2.List特点:元素有放入顺序,元素可重复:另外list支持for循环,也就是通过下标来遍历,也可以用迭代器, 3.Set特点: ...
- div中的内容超过容器宽度的问题
问题描述: <div class="category"> <div class="column-a">排名</div> ...
- [LeetCode] Sliding Window Median 滑动窗口中位数
Median is the middle value in an ordered integer list. If the size of the list is even, there is no ...
- [LeetCode] Next Greater Element II 下一个较大的元素之二
Given a circular array (the next element of the last element is the first element of the array), pri ...
- MySQL 并行复制从库发生自动重启分析
并行复制从库发生自动重启分析 背景 半同步复制从库在晚上凌晨2点半发生自动重启,另一个异步复制从库在第二天凌晨3点也发生了自动重启. 分析 版本mysql 5.7.16 mysql> show ...
- Mysql之库表操作(胖胖老师)
SQL概念:结构化查询语言(SQL = Structured Query Language),也是一种编程语言(数据库查询和程序设计语言),可以用于数据的存取及查询,更新,管理关系型数据库系统ps: ...
- 【前端】Ubuntu16下nodejs+npm+vue环境配置
笔者最近在学习vue.js,不过一直都是在runoob上面各种尝试.今天笔者在本机(Ubuntu16.04)尝试部署了nodejs+npm+vue开发环境,接下来将尽可能详细的讲述安装过程,帮助新人少 ...
- [HNOI 2002]彩票
Description 某地发行一套彩票.彩票上写有1到M这M个自然数.彩民可以在这M个数中任意选取N个不同的数打圈.每个彩民只能买一张彩票,不同的彩民的彩票上的选择不同. 每次抽奖将抽出两个自然数X ...