`PhpZip`
========
`PhpZip` is a php-library for extended work with ZIP-archives.
[![Build Status](https://travis-ci.org/Ne-Lexa/php-zip.svg?branch=master)](https://travis-ci.org/Ne-Lexa/php-zip)
[![Code Coverage](https://scrutinizer-ci.com/g/Ne-Lexa/php-zip/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/Ne-Lexa/php-zip/?branch=master)
[![Latest Stable Version](https://poser.pugx.org/nelexa/zip/v/stable)](https://packagist.org/packages/nelexa/zip)
[![Total Downloads](https://poser.pugx.org/nelexa/zip/downloads)](https://packagist.org/packages/nelexa/zip)
[![Minimum PHP Version](http://img.shields.io/badge/php-%3E%3D%205.5-8892BF.svg)](https://php.net/)
[![License](https://poser.pugx.org/nelexa/zip/license)](https://packagist.org/packages/nelexa/zip)
[Russian Documentation](README.RU.md)
Table of contents
-----------------
- [Features](#Features)
- [Requirements](#Requirements)
- [Installation](#Installation)
- [Examples](#Examples)
- [Glossary](#Glossary)
- [Documentation](#Documentation)
+ [Overview of methods of the class `\PhpZip\ZipFile`](#Documentation-Overview)
+ [Creation/Opening of ZIP-archive](#Documentation-Open-Zip-Archive)
+ [Reading entries from the archive](#Documentation-Open-Zip-Entries)
+ [Iterating entries](#Documentation-Zip-Iterate)
+ [Getting information about entries](#Documentation-Zip-Info)
+ [Adding entries to the archive](#Documentation-Add-Zip-Entries)
+ [Deleting entries from the archive](#Documentation-Remove-Zip-Entries)
+ [Working with entries and archive](#Documentation-Entries)
+ [Working with passwords](#Documentation-Password)
+ [zipalign - alignment tool for Android (APK) files](#Documentation-ZipAlign-Usage)
+ [Undo changes](#Documentation-Unchanged)
+ [Saving a file or output to a browser](#Documentation-Save-Or-Output-Entries)
+ [Closing the archive](#Documentation-Close-Zip-Archive)
- [Running the tests](#Running-Tests)
- [Changelog](#Changelog)
- [Upgrade](#Upgrade)
+ [Upgrade version 2 to version 3.0](#Upgrade-v2-to-v3)
### <a name="Features"></a> Features
- Opening and unzipping zip files.
- Creating ZIP-archives.
- Modifying ZIP archives.
- Pure php (not require extension `php-zip` and class `\ZipArchive`).
- It supports saving the archive to a file, outputting the archive to the browser, or outputting it as a string without saving it to a file.
- Archival comments and comments of individual entry are supported.
- Get information about each entry in the archive.
- Only the following compression methods are supported:
+ No compressed (Stored).
+ Deflate compression.
+ BZIP2 compression with the extension `php-bz2`.
- Support for `ZIP64` (file size is more than 4 GB or the number of entries in the archive is more than 65535).
- Built-in support for aligning the archive to optimize Android packages (APK) [`zipalign`](https://developer.android.com/studio/command-line/zipalign.html).
- Working with passwords for PHP 5.5
> **Attention!**
>
> For 32-bit systems, the `Traditional PKWARE Encryption (ZipCrypto)` encryption method is not currently supported.
> Use the encryption method `WinZIP AES Encryption`, whenever possible.
+ Set the password to read the archive for all entries or only for some.
+ Change the password for the archive, including for individual entries.
+ Delete the archive password for all or individual entries.
+ Set the password and/or the encryption method, both for all, and for individual entries in the archive.
+ Set different passwords and encryption methods for different entries.
+ Delete the password for all or some entries.
+ Support `Traditional PKWARE Encryption (ZipCrypto)` and `WinZIP AES Encryption` encryption methods.
+ Set the encryption method for all or individual entries in the archive.
### <a name="Requirements"></a> Requirements
- `PHP` >= 5.5 (preferably 64-bit).
- Optional php-extension `bzip2` for BZIP2 compression.
- Optional php-extension `openssl` or `mcrypt` for `WinZip Aes Encryption` support.
### <a name="Installation"></a> Installation
`composer require nelexa/zip`
Latest stable version: [![Latest Stable Version](https://poser.pugx.org/nelexa/zip/v/stable)](https://packagist.org/packages/nelexa/zip)
### <a name="Examples"></a> Examples
```php
// create new archive
$zipFile = new \PhpZip\ZipFile();
try{
$zipFile
->addFromString('zip/entry/filename', 'Is file content') // add an entry from the string
->addFile('/path/to/file', 'data/tofile') // add an entry from the file
->addDir(__DIR__, 'to/path/') // add files from the directory
->saveAsFile($outputFilename) // save the archive to a file
->close(); // close archive
// open archive, extract, add files, set password and output to browser.
$zipFile
->openFile($outputFilename) // open archive from file
->extractTo($outputDirExtract) // extract files to the specified directory
->deleteFromRegex('~^\.~') // delete all hidden (Unix) files
->addFromString('dir/file.txt', 'Test file') // add a new entry from the string
->setPassword('password') // set password for all entries
->outputAsAttachment('library.jar'); // output to the browser without saving to a file
}
catch(\PhpZip\Exception\ZipException $e){
// handle exception
}
finally{
$zipFile->close();
}
```
Other examples can be found in the `tests/` folder
### <a name="Glossary"></a> Glossary
**Zip Entry** - file or folder in a ZIP-archive. Each entry in the archive has certain properties, for example: file name, compression method, encryption method, file size before compression, file size after compression, CRC32 and others.
### <a name="Documentation"></a> Documentation:
#### <a name="Documentation-Overview"></a> Overview of methods of the class `\PhpZip\ZipFile`
- [ZipFile::__construct](#Documentation-ZipFile-__construct) - initializes the ZIP archive.
- [ZipFile::addAll](#Documentation-ZipFile-addAll) - adds all entries from an array.
- [ZipFile::addDir](#Documentation-ZipFile-addDir) - adds files to the archive from the directory on the specified path without subdirectories.
- [ZipFile::addDirRecursive](#Documentation-ZipFile-addDirRecursive) - adds files to the archive from the directory on the specified path with subdirectories.
- [ZipFile::addEmptyDir](#Documentation-ZipFile-addEmptyDir) - add a new directory.
- [ZipFile::addFile](#Documentation-ZipFile-addFile) - adds a file to a ZIP archive from the given path.
- [ZipFile::addSplFile](#Documentation-ZipFile-addSplFile) - adds a `\SplFileInfo` to a ZIP archive.
- [ZipFile::addFromFinder](#Documentation-ZipFile-addFromFinder) - adds files from the `Symfony\Component\Finder\Finder` to a ZIP archive.
- [ZipFile::addFilesFromIterator](#Documentation-ZipFile-addFilesFromIterator) - adds files from the iterator of directories.
- [ZipFile::addFilesFromGlob](#Documentation-ZipFile-addFilesFromGlob) - adds files from a directory by glob pattern without subdirectories.
- [ZipFile::addFilesFromGlobRecursive](#Documentation-ZipFile-addFilesFromGlobRecursive) - adds files from a directory by glob pattern with subdirectories.
- [ZipFile::addFilesFromRegex](#Documentation-ZipFile-addFilesFromRegex) - adds files from a directory by PCRE pattern without subdirectories.
- [ZipFile::addFilesFromRegexRecursive](#Documentation-ZipFile-addFilesFromRegexRecursive) - adds files from a directory by PCRE pattern with subdirectories.
- [ZipFile::addFromStream](#Documentation-ZipFile-addFromStream) - adds a entry from the stream to the ZIP archive.
- [ZipFile::addFromString](#Documentation-ZipFile-addFromString) - adds a file to a ZIP archive using its contents.
- [ZipFile::close](#Documentation-ZipFile-close) - close the archive.
- [ZipFile::count](#Documentation-ZipFile-count) - returns the number of entries in the archive.
- [ZipFile::deleteFromName](#Documentation-ZipFile-deleteFromName) - deletes an entry in the archive using its name.
没有合适的资源?快使用搜索试试~ 我知道了~
ThinkPHP课程表小程序源码开源版,前后端分离
共2000个文件
js:1566个
html:125个
md:122个
2 下载量 159 浏览量
2023-10-13
21:11:58
上传
评论
收藏 23.42MB ZIP 举报
温馨提示
1、情侣功能 2、情侣间留言 3、情侣间互相设置课程表背景 4、自己日、周课程表背景设置 5、教务系统课程表导入 6、导入别人分享的课表 7、导入别人分享的单课 8、多校支持 9、首页顶部氛围设置(管理员设置,节日氛围) 环境要求 1、服务端:php+mysql(基于FastAdmin) 2、小程序端:原生+colorui 准备工作 1、需自备服务器和备案过的域名 2、申请https证书,dnspod网站可以免费申请一年的 3、安装PHP运行环境(PHP >= 7.1 且 = 5.5.0) 4、到微信公众平台,申请一个小程序,获取AppID和AppSecret 服务端部署教程 1、添加站点并上传代码至根目录 2、绑定到项目中的public目录为运行目录,伪静态选择thinkphp 3、输入你绑定的域名,会自动跳转至安装界面 4、根据提示安装(以上三步其实是安装FastAdmin框架) 5、进入后台,插件管理里面,搜索“练手课表”,安装 6、安装第三方登录插件 7、设置小程序AppID和AppSecret(微信公众平台获取),练手Lab秘钥
资源推荐
资源详情
资源评论
收起资源包目录
ThinkPHP课程表小程序源码开源版,前后端分离 (2000个子文件)
bootstrap.css 143KB
bootstrap.min.css 119KB
selectpage.css 41KB
font-awesome.css 37KB
style.css 34KB
style.css 34KB
style.css 31KB
style.css 31KB
font-awesome.min.css 30KB
style.min.css 29KB
style.min.css 27KB
bootstrap-theme.css 25KB
bootstrap-table-group-by.css 24KB
bootstrap-table-group-by.css 24KB
bootstrap-theme.min.css 23KB
layer.css 15KB
layer.css 14KB
bootstrap-datetimepicker.css 9KB
daterangepicker.css 8KB
bootstrap-datetimepicker.min.css 8KB
toastr.css 7KB
bootstrap-select.css 7KB
bootstrap-select.css 7KB
bootstrap-table.css 7KB
bootstrap-table.css 7KB
toastr.min.css 6KB
bootstrap-select.min.css 6KB
bootstrap-select.min.css 6KB
layer.css 6KB
bootstrap-table.min.css 6KB
layer.css 5KB
custom.css 5KB
slider.css 5KB
qunit.css 5KB
jquery.validator.css 4KB
style.css 3KB
style.css 3KB
city-picker.css 3KB
city-picker.css 3KB
base.css 2KB
bootstrap-datetimepicker-standalone.css 2KB
base.css 2KB
website.css 2KB
prettify.css 2KB
demo.css 1KB
style.css 842B
bootstrap-table-reorder-rows.css 819B
bootstrap-table-reorder-rows.css 819B
prettify-1.0.css 762B
bootstrap-table-fixed-columns.css 739B
bootstrap-table-fixed-columns.css 739B
bootstrap-table-tree-column.css 582B
bootstrap-table-tree-column.css 582B
bootstrap-table-sticky-header.css 416B
bootstrap-table-sticky-header.css 416B
bootstrap-table-multiple-selection-row.css 306B
bootstrap-table-multiple-selection-row.css 306B
bootstrap-table-click-edit-row.css 287B
bootstrap-table-click-edit-row.css 287B
bootstrap-table-filter-control.css 190B
bootstrap-table-filter-control.css 190B
bootstrap-table-jumpto.css 148B
bootstrap-table-jumpto.css 148B
bootstrap-table-group-by.css 129B
bootstrap-table-group-by.css 129B
bootstrap-table-auto-refresh.css 46B
bootstrap-table-auto-refresh.css 46B
rail.html 57KB
scrollbar.html 57KB
index.html 43KB
height-width.html 35KB
multiple-elements.html 35KB
index.html 34KB
index.html 29KB
programmatic-scrolling.html 25KB
start-position.html 24KB
allow-page-scroll.html 24KB
index.html 24KB
mouse-wheel.html 24KB
disable-fade-out.html 24KB
index.html 16KB
index.html 14KB
demo.html 13KB
chaining.html 13KB
test-speed.html 11KB
install.html 11KB
scroll-events.html 11KB
nested.html 11KB
profile.html 10KB
index.html 10KB
control.html 10KB
edit.html 9KB
config.html 8KB
index.html 7KB
index.html 7KB
login.html 6KB
header.html 6KB
test-native.html 5KB
test.html 5KB
edit.html 5KB
共 2000 条
- 1
- 2
- 3
- 4
- 5
- 6
- 20
资源评论
行动之上
- 粉丝: 2275
- 资源: 927
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- (179941432)基于MATLAB车牌识别系统【GUI含界面】.zip
- (179941434)基于MATLAB车牌识别系统【含界面GUI】.zip
- (178021462)基于Javaweb+ssm的医院在线挂号系统的设计与实现.zip
- (178047214)基于springboot图书管理系统.zip
- 张郅奇 的Python学习过程
- (23775420)欧姆龙PLC CP1H-E CP1L-E CJ2M CP1E 以太网通讯.zip
- (174590622)计算机课程设计-IP数据包解析
- (175550824)泛海三江全系调试软件PCSet-All2.0.3 1
- (172742832)实验1 - LC并联谐振回路仿真实验报告1
- 网络搭建练习题.pkt
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功