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 上传进度?
基础教程推荐
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
- 如何替换eregi() 2022-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
