开发者

FTP client to zip before upload and unzip on the server after upload

I am always working with some big websites that is annoying to upload gi开发者_运维问答ven 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...


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


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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜