takuya/php-7z-cmd-wrapper
Composer 安装命令:
composer require takuya/php-7z-cmd-wrapper
包简介
7z Archiver Command Wrapper
README 文档
README
7z command supports several type of archive.
requirements
sudo apt install p7zip-full
rar will be installed as non-free
sudo apt install p7zip-rar # debian non-free
usage
Access with file name.
$a7z = new Archive7zReader("sample.zip"); foreach( $a7z->files() as $name) { $bin = $a7z->content($name); }
Access with index.
$a7z = new Archive7zReader("sample.zip"); $bin = $a7z->at(0);
limitations
currently, this project aimed at READING archive. write/append not yet.
character encodings.(reading archive)
7z command will encode filenames by shell ENV[LANG].
So we should take care of encoding using shell env LANG='XXX' and php mb_string.
cp932(jp/windows/filename) example. #01 using utf8
$a = new Archive7zReader($f); $a->setLang('ja_JP.UTF8'); $file_name = $a->files()[1]; $file_name = $name = mb_convert_encoding($file_name,"UTF8","UTF8,CP932");
cp932(jp/windows/filename) example. #02 using cp932
$a = new Archive7zReader($f); $a->setLang('ja_JP.SJIS'); $file_name = $a->files()[1]; $file_name = $name = mb_convert_encoding($file_name,"UTF8","CP932");
Installation from github
repo=git@github.com:takuya/php-7z-cmd-wrapper.git
composer config repositories.takuya/php-7z-cmd-wrapper vcs $repo
composer require takuya/php-7z-cmd-wrapper
Installation from packagist
composre require takuya/php-7z-cmd-wrapper
takuya/php-7z-cmd-wrapper 适用场景与选型建议
takuya/php-7z-cmd-wrapper 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 116 次下载、GitHub Stars 达 0, 最近一次更新时间为 2021 年 08 月 23 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 takuya/php-7z-cmd-wrapper 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 takuya/php-7z-cmd-wrapper 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 116
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 17
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-or-later
- 更新时间: 2021-08-23