jQuery ajaxSubmit 文件上传 后台获取不了,上传的文件,该怎么处理

jQuery ajaxSubmit 文件上传 后台获取不了,上传的文件
html如下:

<!doctype html>
<html>
<head>
</head>
<body>
<input type="file" name="file" id="file" />
<script type="text/javascript" src="./jquery-1.7.1.min.js"></script>
<script type="text/javascript" src="./jquery.form.js"></script>
<script type="text/javascript">
$(function(){
$("#file").change(function(){
$(this).wrap("<form id='ajaxupload' action='./index.php' method='post' enctype='multipart/form-data'></form>");
$("#ajaxupload").ajaxSubmit({
dataType:'text',
success:function(data){
alert(data);
},
error:function(data){

}
});
$(this).unwrap();
});
});
</script>
</body>
</html>

后端php:

<?php 
print_r($_FILES);
?>


现在情况是 $_FILES 打印出来是空的
------解决方案--------------------
ajax文件上传与ajax是两回事,ajax是不能上传文件的,所以ajax文件上传用的不是ajax而是表单提交;
http://blog.csdn.net/wzs_xyz/article/details/9763861
根据原理,结合jquery.form的源码分析分析

------解决方案--------------------
IE下$(this).unwrap();要放到success回调里面,要不没反应ie

        $(function () {
            $("#file").change(function () {
                $(this).wrap("<form id='ajaxupload' action='upload.php' method='post' enctype='multipart/form-data'></form>");
                $("#ajaxupload").ajaxSubmit({
                    dataType: 'text',
                    success: function (data) {
                        alert( data ');
                        $(this).unwrap();/////////////////
                    },
                    error: function (data) {
                    }
                });
            });
        });