PHP文件上传。发布与放置?

标签 php performance http file-upload

我正在建立一个网站,人们可以在其中上传文件大小限制为 1GB 的视频。 Firefox>3.6 和 Chrome>11 是我打算支持的唯一浏览器。使用 PUT 上传文件有什么优点/缺点吗?方法结束 POST大文件的方法。不同的http方法对网站的性能有何影响?

最佳答案

我对此事没有个人意见,但这里有一些资源可能会对您有所帮助:

PUT is a much more limited operation that never does anything more than PUT one page at a specified URL. It is idempotent, which is a fancy way of saying that doing it twice is the same as doing it once. Both PUT and POST can be used to create new pages. However PUT should be used when the client specifies the location for the page. PUT is normally the right protocol for a web editor like DreamWeaver or BBEdit. POST is used when the client gives sends the page to the the server, and the server then tells the client where it put it. POST is normally the right protocol for a blog editor like TypePad or anything that inputs into a content management system. In SQL analogy, POST is an INSERT with an automatically generated primary key, and PUT is an INSERT that specifies the primary key in the INSERT statement.


根据我阅读上述链接的理解,浏览主要部分告诉我 PUT 方法主要用于内容没有组织的原始数据,没有编码或拆分成多部分消息。

PUT 看起来像是 Socket 到 Socket 连接,例如 Telnet <> Mail Server,因此使用 POST 可能会提供更多的底层框架来在单个批处理中上传多个文件,因为您已经有了边界内置在我的 POST 方法中

关于PHP文件上传。发布与放置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6511122/

相关文章:

python - ZeroMQ、Redis 和 Gevent

java - 如何提高使用 mapreduce 分析日志文件的性能

javascript - 如何转换来自 http.post 响应 json 的数据以便我可以在我的应用程序中使用它?

image - 两张照片(大)具有相同字节数的几率是多少?

php - 在 SELECT 查询中使用 *

php - ZF2 - 如何翻译 Zend 表单验证错误消息?

php - 是否有一个好的 PHP 库可用于将 bool 搜索运算符解析为 MySQL 全文运算符?

php - Joomla mysql table.php 语法

javascript - 比较引起消化的方法

rest - 如何在 Robot Framework 中使用 REST 库?