简体   繁体   English

通过FTP上传大目录的最佳压缩方式是什么?

[英]What's the best compression to use with uploading big catalog by FTP?

If you are uploading something like Zend Framework using poor internet conneciton it may be problematic. 如果您使用不良的Internet连接上传类似Zend Framework的内容,则可能会出现问题。

I think the compression of the catalog is the best solution. 我认为压缩目录是最好的解决方案。 But what compression system is the best for this task ? 但是,哪种压缩系统最适合此任务? We are using PHP, of course. 当然,我们正在使用PHP。

I have some ideas like PHP + exec + unrar and http://www.php.net/manual/en/refs.compression.php but they are all not flexible enough and are not accessible in many hostings. 我有一些想法,例如PHP + exec + unrar和http://www.php.net/manual/en/refs.compression.php,但它们都不够灵活,在许多托管服务中都无法访问。

I assume you mean uploading the Zend Framework itself (or other programming components) and extracting it on the server side in a shared hosting environment. 我假设您的意思是上载Zend Framework本身(或其他编程组件)并在共享主机环境中的服务器端将其解压缩。

This is not easy, as in a shared environment, you can't rely on unzip tar etc. being available. 这并不容易,因为在共享环境中,您不能依靠可用的unzip tar等。 Any exec based idea is therefore not feasible IMO. 因此,任何基于exec的想法都是不可行的IMO。

Probaby the only reliable possibility is a PHP Unzip class like dUnzip . 唯一可靠的可能性就是像dUnzip这样的PHP Unzip类。 With that, you would upload the zip file onto the server, and send the script along to unpack it. 这样,您就可以将zip文件上传到服务器上,并发送脚本以将其解压缩。 It requires the gzip extension activated in PHP, but that is the case with most providers. 它需要在PHP中激活gzip扩展名,但是大多数提供程序都是这种情况。

Iirc, the Zend Framework can be installed via PEAR. Iirc,可以通过PEAR安装Zend Framework。 You could ask your provider (if you are using shared using which i assume) to install that PEAR package for you and then you should be able to just include it via the php default include-path. 您可以要求您的提供者(如果您使用的是我假定的共享方式)为您安装该PEAR软件包,那么您应该能够通过php默认的include-path包含它。

http://code.google.com/p/zend/ http://code.google.com/p/zend/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM