如何向 HTML 文件上传表单添加进度条
可能的重复:
PHP 上传进度条
大家好,
我有一个现有的 HTML 表单,用于上传文件,以及每次上传时写入 XML 文件的其他信息。其他人写了这个脚本,我对 php 相对缺乏经验,所以我不能真正使用插件来替换文件输入部分,因为 php 为上传的文件提供了另一个进程所需的特殊名称。
我正在运行 IIS 7 和 php 5.3。我尝试安装 APC PECL 扩展,尽管这不起作用(尝试使用 apache,但在启用 APC 时它甚至不会启动)。我也尝试过 uploadprogress 扩展,但这不起作用。
谁能帮我修改现有的表单以显示上传进度?
非常感谢 亚历克斯
Possible Duplicate:
Upload Progress Bar in PHP
Hi guys,
I have an existing HTML form which is used to upload a file, as well as other information which is written to an XML file for each upload. Someone else wrote this script and Im relatively inexperienced with php so I cant really use a plugin to replace the file input section, because the php gives the uploaded file a special name which is required in another process.
I am running IIS 7 with php 5.3. I have tried to install APC PECL extension though this does not work (have tried to use apache but it wont even start when APC is enabled). I have also tried the uploadprogress extension but this doesn't work.
Can anyone help me modify my existing form so that it shows the upload progress?
Many Thanks
Alex
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您无法借助 PHP 显示上传状态。
PHP脚本在服务器端解释,但上传是传输,因此服务器不知道上传的任何信息以及还剩多少。
您可以使用 flash-uploader 来更好地控制上传过程。
You can not display upload status with help of PHP.
PHP-Script are interpreted on server side, but uploading is transfer, so server doesn't know anything about upload and how much it still remaining.
You can use flash-uploader to get more controll about uploading process.