windows 环境
1.0 首先需要从官网上下载,下载地址 https://windows.php.net/downloads/pecl/releases/zip/
如下图根据,我本地当前所使用的phpstudy:故需要选择x86/nts的扩展
2.1 下载下来后解压,将php_zip.dll复制到当前phpstudy 对应ext目录下,
2.2 将php_zip.dll加入到php.ini 中,重启phpstudy
3.0 zip 工具类 https://github.com/dreamgirLi/ZIP-Tool-Class
4.0 PHP 7.0 自带FTP, 只需要开启即可
5.0 FTP 工具类 https://github.com/dreamgirLi/FTP-Tool-Class
相关参考文档:
php 将文件打包成 zip
客户端在防火墙之后,php利用ftp上传文件时候ftp_put失败
PHP使用FTP上传文件到服务器(实战篇)
php ftp 使用 以及 php_connect_nonb() failed: Operation now in progress (115)