onunix 2012-08-27 15:04:16 4548次浏览 4条回复 0 0 0

现在我的swfupload好像开始工作了,点击后,弹出对话框,选一个文件,然后点打开,过会就提示:All images received.,我觉得好像是OK了,但是文件被上传到服务器的哪个目录里呢?怎么去找这个文件?

  • 回复于 2012-08-28 11:35 举报

    @的意思就是屏蔽错误提示。
    可以echo一下。exit($filedata);

  • 回复于 2012-08-28 14:01 举报

    去掉了move_uploaded_file,代码如下:

    try{ 
         $filedata=$_FILES['Filedata'];
         
         echo $filedata['tmp_name'];
        }
    catch(Exception $e){
        echo 'Error: ' . $e->getMessage();
    }
    

    调试信息如下:

    SWF DEBUG: ReturnUploadStart(): File accepted by startUpload event and readied for upload.  Starting upload to /Yii/index.php?r=vEHICLEPICTURE/upload&PHPSESSID=s60td0gov8cumesuegrkrenk13 for File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress (OPEN): File ID: SWFUpload_0_0
    SWF DEBUG: Event: uploadProgress: File ID: SWFUpload_0_0. Bytes: 95490. Total: 95490
    SWF DEBUG: Event: uploadSuccess: File ID: SWFUpload_0_0 Response Received: true Data: [color=Blue]C:\Documents and Settings\Administrator\Local Settings\Temp\1\php88.tmp[/color]
    SWF DEBUG: Event: uploadComplete : Upload cycle complete.
    EXCEPTION: message: 'document.getElementById(...)' 为空或不是对象
    EXCEPTION: number: -2146823281
    EXCEPTION: description: 'document.getElementById(...)' 为空或不是对象
    

    但是去找,没有找到 这个文件:C:\Documents and Settings\Administrator\Local Settings\Temp\1\php88.tmp

    似乎文件根本没有生成,怎么回事呢?

  • 回复于 2012-08-28 14:02 举报

    似乎文件没有传上去,没有传上去,move_uploaded_file当然没有用。

  • 回复于 2012-08-28 16:00 举报

    请问上传过程应该跟踪哪个函数呢?看来文件没有生成,可能问题出在上传过程中。

您需要登录后才可以回复。登录 | 立即注册