//上传 $file:上传图片的路径和名称
function upload($file){
var uploadUrl=defaultUrl+"/Personal/resume";
var task=plus.uploader.createUpload(uploadUrl,
{method:"POST"},
function(d, t){
alert(t);
}
);
task.addFile($file, {key:"testdoc"});
task.addData( "string_key", "string_value" );
task.start();
}
php后台读取json_encode($_FILES, true)结果是:{"testdoc":{"name":"IMG_20160124_162147.jpg","type":"","tmp_name":"","error":1,"size":0}} 请问错在哪里呢
1 个回复
hihay (作者)
没有成功上传。可alert(t);的结果却是200