Upload progress using pure PHP/AJAX?(使用纯 PHP/AJAX 上传进度?)
问题描述
我确定以前有人问过这个问题,但由于我似乎找不到一个好的答案,所以我在这里,再次问......:)
I'm sure this has been asked before, but as I can't seem to find a good answer, here I am, asking... again. :)
有没有什么方法可以混合使用 HTML、JavaScript/AJAX 和 PHP 来报告文件上传的实际进度?
Is there any way, using only a mixture of HTML, JavaScript/AJAX, and PHP, to report the actual progress of a file upload?
回复任何建议 SWFUpload 或类似内容的人:
In reply to anyone suggesting SWFUpload or similar:
我知道这一切.走过那条路.我正在寻找 100% 纯的解决方案(是的,我知道我可能不会得到它).
I know all about it. Been down that road. I'm looking for a 100% pure solution (and yes, I know I probably won't get it).
推荐答案
如果您能够将 PECL 包添加到 PHP 中,则有 上传进度 包.
If you're able to add PECL packages into your PHP, there is the uploadprogress package.
不过,最简单的方法是使用 swfupload.
The simplest way would be to just use swfupload, though.
这篇关于使用纯 PHP/AJAX 上传进度?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用纯 PHP/AJAX 上传进度?


基础教程推荐
- 在 Woocommerce 中根据运输方式和付款方式添加费用 2021-01-01
- mysqli_insert_id 是否有可能在高流量应用程序中返回 2021-01-01
- 在 PHP 中强制下载文件 - 在 Joomla 框架内 2022-01-01
- 超薄框架REST服务两次获得输出 2022-01-01
- 通过 PHP SoapClient 请求发送原始 XML 2021-01-01
- 在多维数组中查找最大值 2021-01-01
- 如何在 PHP 中的请求之间持久化对象 2022-01-01
- XAMPP 服务器不加载 CSS 文件 2022-01-01
- WooCommerce 中选定产品类别的自定义产品价格后缀 2021-01-01
- Libpuzzle 索引数百万张图片? 2022-01-01