If (empty ($ Filedata) |! Is_uploaded_file ($ Filedata) & nbsp ;{& nbsp; echo & quot; ERROR: UploadError! & Quot; & nbsp; exit (0); & nbsp;} always stuck in the swfupload Upload failure solution
If (empty ($ Filedata) |! Is_uploaded_file ($ Filedata ))
{
Echo "ERROR: Upload Error! ";
Exit (0 );
}
The filedata value cannot be obtained at this location.
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", // 2 MB
File_types: "*. flv ",
File_types_description: "Select flv video format ",
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: 'Select a local video (the maximum video size is 500 MB. multiple videos are supported )',
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: "pFileProgressContainer ",
Thumbnails_target: "thumbnails"
},
// Debug Settings
Debug: true
});
};
------ Solution --------------------
There is too little information. Unable to judge.
------ Solution --------------------
Since the prompt "$ Filedata" cannot be obtained, find the cause in the code above. When will it assign a value to $ Filedata? analyze it slowly and take a look.
------ Solution --------------------
Upload1 = new SWFUpload ({... file_post_name: "Filedata ",.......});
Whether this attribute is the sending name of the file data.
If this is inconsistent, the file data and information are indeed not obtained.
For php, you need to use $ _ FILES ["Filedata"] to obtain data.
This part is the cause.