如何限制在PHP或Apache的文件上传速度? [英] How to limit file upload speed in php or apache?
问题描述
我在Zend Framework上做了一些表单,用于在Ubuntu 9.10上的Apache friends - xamppserver 1.7.1上进行文件上传。
我的问题是,我为这个上传添加了进度条,而且由于xampp服务器在我的本地主机上,文件上传速度非常快。因此,如果进度条正常工作,我没有时间检查或观察。有一个简单的方法(在PHP,Zend框架或Apache的一些选项),以减少文件上传速度,例如20KB / S。
我试着用Apache的 mod_bw ,但是它似乎它只限制从服务器下载,而不是上传到服务器。我也尝试上传大文件,如400MB,但不好,因为我的网络浏览器几乎崩溃。
你应该看看这些问题的答案:
- Firefox插件模拟缓慢的互联网连接或限制带宽? 模拟慢速网络连接的网络工具 降低我的网络连接的工具? - 那么,这是一个窗口,所以可能不会有趣的你
这些不会只用于PHP / Apache,但可能会有所帮助...
I'm doing some form in Zend Framework for file upload on "Apache friends - xampp" server 1.7.1 on Ubuntu 9.10.
My problem is that I what to add progress bar for this upload and since xampp server is on my localhost, file uploads are very fast. As a result, I have no time to check or observer if progress bar works as it should.
Is there an easy way (some option in PHP, Zend Framework or Apache) to reduce the file upload speed to e.g. 20kB/s.
I tried to use mod_bw for Apache but it seems that it limits only downloads from the server, not the uploads to the server. I also tried to upload large files, like 400MB, but it is not good, since my web browser nearly crashes.
You should take a look at the answers to these questions :
- Firefox plugin to simulate slow internet connection or limit bandwidth?
- Network tools that simulate slow network connection
- Tool for degrading my network connection? -- well, that one is for windows, so probably not that interesting for you
Those will not be only for PHP/Apache, but might help anyway...
这篇关于如何限制在PHP或Apache的文件上传速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!