PHP上传进度状态

时间:2010-10-27 00:01:32

标签: php jquery upload progress-bar

我需要显示上传状态(总大小,上传大小和上传速度)但每个脚本都需要库,我不知道它是如何工作的(我在Windows下使用XAMPP)...我只有APC Lib。

我尝试过FancyUpload,但即使在演示中我也遇到了这个错误: 错误导致发送或加载操作失败(错误#2038) 我尝试了SWFUpload,但得到了同样的信息。

有什么想法吗?

谢谢!

2 个答案:

答案 0 :(得分:2)

查看Uploadify,易于使用和分配示例 它有一个你想要的进度条,它显示了上传的速度和字节数 易于配置。

jQuery 1.3.2+是必需的。

答案 1 :(得分:0)

嗯,这很奇怪,但这是我的设置:

'uploader': '/_PATH_TO_YOUR_/uploader.swf', // Path to uploader.swf
'cancelImg': '/_PATH_TO_YOUR_/cancel.png', // Path to any cancel image
'script': '/_PATH_TO_YOUR_/upload.php', // Path to your upload script, you may change this to something else, depends on what your server is running
'folder': '/uploaded/',  // Your upload filder
//'fileDesc': 'Images Only (*.PNG, *.JPG, *.JPEG, *.GIF)', // Use this if you want to allow only image uploads, is shown when you press the Browse button in side the file types box
//'fileExt': '*.png, *.jpg, *.gif, *.jpeg', // Allowed file extensions
'sizeLimit': 52428800, // Max file size
'simUploadLimit': 1, // Only 1 upload at the same time, 0 = unlimited uploads at the same time
'multi': true, // Allows multi-upload, you can select more then 1 file/image
'buttonText': 'Select Files', // This I don't know if it works
'checkScript': '/source/interface/addons/uploadify/check.php', // Path to your upload check script
'displayData': 'speed', // What to display when you start the upload
'buttonText': 'Browse', // The browse button, .swf file

如果可以的话,你可以发布到目前为止的JavaScript,所以我可以帮助你:)