swfupload 上传失败求解解决思路
程序员文章站
2022-04-25 23:05:44
...
swfupload 上传失败求解
if ( empty( $Filedata ) || !is_uploaded_file( $Filedata ) )
{
echo "ERROR: Upload Error! ";
exit( 0 );
}
老是卡在这个位置 获取不到filedata的值
window.onload = function ()
{
swfu = new SWFUpload(
{
// Backend Settings
upload_url: "swfuploadvideo.php",
post_params: {"PHPSESSID": "", "dopost" : "","utype":"shangjia"},
// File Upload Settings
file_size_limit : "500 MB", // 2MB
file_types : "*.flv",
file_types_description : "选择 flv 格式视频",
file_upload_limit : "1",
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
button_image_url : "img/SmallSpyGlassWithTransperancy_17x18.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 250,
button_height: 18,
button_text : ' ',
button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
button_text_top_padding: 0,
button_text_left_padding: 18,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
// Flash Settings
flash_url : "../images/swfupload/swfupload.swf",
custom_settings : {
upload_target : "divFileProgressContainer",
thumbnails_target:"thumbnails"
},
// Debug Settings
debug: true
});
};
------解决方案--------------------
信息太少。无法判断。
------解决方案--------------------
既然,提示“$Filedata”获取不到,在往上面的代码找原因,是啥时候给$Filedata赋值,慢慢向上分析,看看
------解决方案--------------------
upload1 = new SWFUpload({ ..... file_post_name : "Filedata", .......});
是不是这个属性的事,文件数据的发送名称。
这个如果不一致,的确是获得不到文件数据和信息的。
php部分 需要通过$_FILES["Filedata"]来获取数据
问题应该出在这部分了
if ( empty( $Filedata ) || !is_uploaded_file( $Filedata ) )
{
echo "ERROR: Upload Error! ";
exit( 0 );
}
老是卡在这个位置 获取不到filedata的值
window.onload = function ()
{
swfu = new SWFUpload(
{
// Backend Settings
upload_url: "swfuploadvideo.php",
post_params: {"PHPSESSID": "", "dopost" : "","utype":"shangjia"},
// File Upload Settings
file_size_limit : "500 MB", // 2MB
file_types : "*.flv",
file_types_description : "选择 flv 格式视频",
file_upload_limit : "1",
file_queue_error_handler : fileQueueError,
file_dialog_complete_handler : fileDialogComplete,
upload_progress_handler : uploadProgress,
upload_error_handler : uploadError,
upload_success_handler : uploadSuccess,
upload_complete_handler : uploadComplete,
button_image_url : "img/SmallSpyGlassWithTransperancy_17x18.png",
button_placeholder_id : "spanButtonPlaceholder",
button_width: 250,
button_height: 18,
button_text : ' ',
button_text_style : '.button { font-family: Helvetica, Arial, sans-serif; font-size: 12pt; } .buttonSmall { font-size: 10pt; }',
button_text_top_padding: 0,
button_text_left_padding: 18,
button_window_mode: SWFUpload.WINDOW_MODE.TRANSPARENT,
button_cursor: SWFUpload.CURSOR.HAND,
// Flash Settings
flash_url : "../images/swfupload/swfupload.swf",
custom_settings : {
upload_target : "divFileProgressContainer",
thumbnails_target:"thumbnails"
},
// Debug Settings
debug: true
});
};
------解决方案--------------------
信息太少。无法判断。
------解决方案--------------------
既然,提示“$Filedata”获取不到,在往上面的代码找原因,是啥时候给$Filedata赋值,慢慢向上分析,看看
------解决方案--------------------
upload1 = new SWFUpload({ ..... file_post_name : "Filedata", .......});
是不是这个属性的事,文件数据的发送名称。
这个如果不一致,的确是获得不到文件数据和信息的。
php部分 需要通过$_FILES["Filedata"]来获取数据
问题应该出在这部分了
相关文章
相关视频
推荐阅读
-
php网站视频播放器-手机网站~求解决思路
-
Wallpaper Engine上传壁纸失败怎么办 Wallpaper Engine上传失败解决办法
-
jQuery uploadify在谷歌和火狐浏览器上传失败的解决方案
-
jQuery uploadify在谷歌和火狐浏览器上传失败的解决方案
-
SWFUpload与CI不能正确上传识别文件MIME类型解决方法分享
-
Wallpaper Engine上传壁纸失败怎么办 Wallpaper Engine上传失败解决办法
-
微信多图上传解决android多图上传失败问题
-
三个思路解决laravel上传文件报错:413 Request Entity Too Large问题
-
关于UEditor编辑器远程图片上传失败的解决办法
-
MaterialDesignInXamlToolkit日期选择器绑定失败解决思路