如何限制在PHP或Apache的文件上传速度? [英] How to limit file upload speed in php or apache?

查看:1881
本文介绍了如何限制在PHP或Apache的文件上传速度?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Zend Framework上做了一些表单,用于在Ubuntu 9.10上的Apache friends - xamppserver 1.7.1上进行文件上传。

我的问题是,我为这个上传添加了进度条,而且由于xampp服务器在我的本地主机上,文件上传速度非常快。因此,如果进度条正常工作,我没有时间检查或观察。有一个简单的方法(在PHP,Zend框架或Apache的一些选项),以减少文件上传速度,例如20KB / S。

我试着用Apache的 mod_bw ,但是它似乎它只限制从服务器下载,而不是上传到服务器。我也尝试上传大文件,如400MB,但不好,因为我的网络浏览器几乎崩溃。

解决方案

你应该看看这些问题的答案:



这些不会只用于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 :

Those will not be only for PHP/Apache, but might help anyway...

这篇关于如何限制在PHP或Apache的文件上传速度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆