欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页  >  后端开发

uploadify 上传问题

程序员文章站 2022-05-24 23:04:22
...
以前使用uploadify上传文件都没有错误,最近做一个程序,使用uploadify上传log日志文件,大部分都能上传成功,包括formData的参数都能成功,但是有极个别的log文件上传的时候上传不成功。
在服务器端打印 $_POST 和 $_FILES,都为空。
日志文件名称都是统一格式的,日志也都是 utf-8编码,但是有些可以成功,有些不能成功,有哪位大神碰到过,请指点一下,谢谢!


回复讨论(解决方案)

以下是uploadify的debug信息

---SWFUpload Instance Info---Version: 2.2.0 2009-03-25Movie Name: SWFUpload_0Settings:	upload_url:               /index.php/data/datainsql/upfile	flash_url:                /public/swf/uploadify.swf?preventswfcaching=1407894488103	use_query_string:         false	requeue_on_error:         true	http_success:             	assume_success_timeout:   30	file_post_name:           Filedata	post_params:              [object Object]	file_types:               *.log	file_types_description:   请选择日志文件	file_size_limit:          0	file_upload_limit:        0	file_queue_limit:         999	debug:                    true	prevent_swf_caching:      true	button_placeholder_id:    file_upload	button_placeholder:       Not Set	button_image_url:         /index.php/data/datainsql/	button_width:             120	button_height:            30	button_text:              	button_text_style:        color: #000000; font-size: 16pt;	button_text_top_padding:  0	button_text_left_padding: 0	button_action:            -110	button_disabled:          false	custom_settings:          [object Object]Event Handlers:	swfupload_loaded_handler assigned:  false	file_dialog_start_handler assigned: true	file_queued_handler assigned:       true	file_queue_error_handler assigned:  true	upload_start_handler assigned:      true	upload_progress_handler assigned:   true	upload_error_handler assigned:      true	upload_success_handler assigned:    true	upload_complete_handler assigned:   true	debug_handler assigned:             trueSWF DEBUG: SWFUpload Init CompleteSWF DEBUG: SWF DEBUG: ----- SWF DEBUG OUTPUT ----SWF DEBUG: Build Number:           SWFUPLOAD 2.2.0SWF DEBUG: movieName:              SWFUpload_0SWF DEBUG: Upload URL:             /index.php/data/datainsql/upfileSWF DEBUG: File Types String:      *.logSWF DEBUG: Parsed File Types:      logSWF DEBUG: HTTP Success:           0SWF DEBUG: File Types Description: 请选择日志文件 (*.log)SWF DEBUG: File Size Limit:        0 bytesSWF DEBUG: File Upload Limit:      0SWF DEBUG: File Queue Limit:       999SWF DEBUG: Post Params:SWF DEBUG:                         type=rizhiSWF DEBUG: ----- END SWF DEBUG OUTPUT ----SWF DEBUG: Removing Flash functions hooks (this should only run in IE and should prevent memory leaks)SWF DEBUG: Event: fileDialogStart : Browsing files. Multi Select. Allowed file types: *.logSWF DEBUG: Select Handler: Received the files selected from the dialog. Processing the file list...SWF DEBUG: Event: fileQueued : File ID: SWFUpload_0_0SWF DEBUG: Event: fileDialogComplete : Finished processing selected files. Files selected: 1. Files Queued: 1SWF DEBUG: StartUpload: First file in queueSWF DEBUG: Event: uploadStart : File ID: SWFUpload_0_0SWF DEBUG: Global Post Item: type=rizhiSWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to /index.php/data/datainsql/upfile for File ID: SWFUpload_0_0SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 589824. Total: 8666287SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 4063232. Total: 8666287SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 7340032. Total: 8666287SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 8666287. Total: 8666287SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Response Received: true Data: {"file":"E:\/web\/kh\/workdata\/\/","type":null,"flag":"error"}SWF DEBUG: Event: uploadComplete : Upload cycle complete.

在服务器端打印 $_POST 和 $_FILES,都为空
是空白,还是空数组?
如果是空数组,则表示上传没有实际进行进行
如果是空白,则表示上传的文件大小超过了 post_max_size 的限定

在服务器端打印 $_POST 和 $_FILES,都为空
是空白,还是空数组?
如果是空数组,则表示上传没有实际进行进行
如果是空白,则表示上传的文件大小超过了 post_max_size 的限定



还需要分别检查各个转发机的max_post_size 踩过这个坑


果然是超大小了,只设置的上传文件大小,没设置POST大小,
相关标签: uploadify 上传