FTP客户端上传前压缩,上传后在服务器上解压

发布于 2024-09-05 05:17:02 字数 307 浏览 3 评论 0原文

我总是与一些大网站合作,考虑到小文件的数量,上传这些网站很烦人。 我使用 Filezilla,但我很高兴购买一些商业解决方案,如果有一个可以在上传之前压缩文件,然后在上传后解压缩它。

必须一直手动执行此操作,这很痛苦。

如果有人知道任何 ftp 客户端或 Filezilla 或其他扩展可以做到这一点...我向 CuteFTP 和 WSFtp 的支持人员发送了一封电子邮件 - 到目前为止没有答案...

我知道 FTP 协议不允许此命令 - 就是这样为什么我要求一个扩展(如果有人知道的话)或者一个免费或商业的 FTP 客户端来完成这项工作......

I am always working with some big websites that is annoying to upload given the number of small files.
I use Filezilla but am happy to buy some commercial solution if there is one out there that can zip the files before upload and then unzip it after upload.

Its a pain to have to manually do that all the time.

If someone know of any ftp client or extension for Filezilla or other that would do that... I sent an email to the support for CuteFTP and WSFtp - no answer so far...

I know FTP protocol does not allow this command - thats why Im asking for a extension (if anyone know) or a free or commercial FTP client that do the job...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

帅哥哥的热头脑 2024-09-12 05:17:02

在一个名为:zip.php 的 php 文件中使用它,

*<?php $zip = new ZipArchive(); $res = $zip->open('yourzipfile.zip'); if ($res === true{
$zip->extractTo('./');
$zip->close();
echo 'ok'; } else
echo 'failed'; ?>*

压缩您的网站并将其上传到服务器的根目录。
还要在同一位置上传 zip.php,

现在在浏览器中输入:www.yoursite.com/zip.php

如果一切顺利,您将收到“ok”;否则会有问题

有关该类的更多详细信息: http://www.php .net/manual/en/class.ziparchive.php

use this in a php file maybe called : zip.php

*<?php $zip = new ZipArchive(); $res = $zip->open('yourzipfile.zip'); if ($res === true{
$zip->extractTo('./');
$zip->close();
echo 'ok'; } else
echo 'failed'; ?>*

zip you site and upload it at the root of your server.
Also upload the zip.php at the same place

now enter this in your browser :www.yoursite.com/zip.php

If everything goes well, you will receive "ok"; otherwise there is a problem

For more details on the class: http://www.php.net/manual/en/class.ziparchive.php

倾`听者〃 2024-09-12 05:17:02

难道您不能设置一些 bash 脚本来 rar 和 ftp 一个文件,然后在服务器上每隔 x 秒检查一次文件是否存在,并在文件存在时解压缩并删除它吗?

Couldn't you set up some bash scripts to rar and ftp a file and then on the server check for a file's presence every x seconds and unrar and remove when it is there?

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文