以前使用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/upfileflash_url: /public/swf/uploadify.swf?preventswfcaching=1407894488103use_query_string: falserequeue_on_error: truehttp_success: assume_success_timeout: 30file_post_name: Filedatapost_params: [object Object]file_types: *.logfile_types_description: 請選擇記錄檔file_size_limit: 0file_upload_limit: 0file_queue_limit: 999debug: trueprevent_swf_caching: truebutton_placeholder_id: file_uploadbutton_placeholder: Not Setbutton_image_url: /index.php/data/datainsql/button_width: 120button_height: 30button_text: button_text_style: color: #000000; font-size: 16pt;button_text_top_padding: 0button_text_left_padding: 0button_action: -110button_disabled: falsecustom_settings: [object Object]Event Handlers:swfupload_loaded_handler assigned: falsefile_dialog_start_handler assigned: truefile_queued_handler assigned: truefile_queue_error_handler assigned: trueupload_start_handler assigned: trueupload_progress_handler assigned: trueupload_error_handler assigned: trueupload_success_handler assigned: trueupload_complete_handler assigned: truedebug_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大小,