lightppd 中使用 APC 进行 PHP 上传
我正在使用 APC 制作上传计量表。这些是文件:
我遇到的问题是,当我执行 FETCH。我在上传时查看了 APC INFO 面板,发现密钥 upload_XXXXX
并未存储在缓存中直到文件完全上传!< /strong>
我做错了什么?我的 php.ini 中是否有配置错误的内容?
I'm using APC to make a upload meter. These are the files:
The problem I'm having is I'm getting nothing when I do the FETCH. I'm taking a look at the APC INFO panel as I'm making the upload and I see that the key upload_XXXXX
isn't stored in the cache until the file is completely uploaded!
What am I doing wrong? Do I have something badly configured in php.ini?
I've read here that there's a bug having to do with lightppd.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如评论中所讨论的,APC 的文件上传进度指示器在 FastCGI 下要么不可靠,要么不起作用。
因此,上传进度指示器的最佳选择是在客户端。
我是 Plupload 的忠实粉丝,这是一个上传小部件,支持不少于 6 个后端,提供比常规文件输入类型(包括支持它的浏览器中的 HTML5 文件接口)。您可以将其与您自己设计的自定义小部件一起独立使用,也可以使用附带的精美 jQuery 小部件。
如果您想要更老派的东西,还有好的旧版 SWFUpload。
当 Javascript 被禁用时,这两个选项都会回退到正常的文件输入。
As discussed in the comments, APC's file upload progress indicator is either unreliable or not functional under FastCGI.
Your best bet for a upload progress indicator is therefore going to be client-side.
I'm a big fan of Plupload, an upload widget that supports no less than six backends to provide better functionality than the regular file input type (including the HTML5 File interface in browsers that support it). You can use it standalone with a custom widget of your own design, or you can use the included fancy jQuery widget.
If you want something a little more oldschool, there's also good old SWFUpload.
Both of these options will fall back to a normal file input when Javascript is disabled.
抱歉,这不是您问题的直接答案,但您可能需要考虑使用 XMLHttpRequest 的 HTML5 文件 API。
developer.mozilla.org 上有一些示例。
缺点是它依赖于浏览器。优点是它独立于服务器。但最终,这将是跟踪文件上传的最佳方式。
Sorry, this isn't a direct answer to your question, but you may want to consider the HTML5 file API with XMLHttpRequest.
There are some examples on developer.mozilla.org.
The downside is that it is browser dependent. The upside is that it is server independent. But ultimately, this will be the best way to track file uploads.