我用EXTJS(http://dev.sencha.com/deploy/dev/examples/form/file-upload.html)的UploadFile的例子,但我不知道在服务器端写入保存上传的文件(在PHP) 帮我请EXTJS和PHP上传文件
我的客户侧面代码是:
var fp = new Ext.FormPanel({
//renderTo: 'fi-form',
fileUpload: true,
width: 500,
frame: true,
title: 'File Upload Form',
autoHeight: true,
bodyStyle: 'padding: 10px 10px 0 10px;',
labelWidth: 50,
defaults: {
anchor: '95%',
allowBlank: false,
msgTarget: 'side'
},
items: [{
xtype: 'fileuploadfield',
id: 'form-file',
emptyText: 'Select an image',
fieldLabel: 'Photo',
name: 'photo-path',
buttonText: '',
buttonCfg: {
iconCls: 'upload-icon'
}
}],
buttons: [{
text: 'Save',
handler: function(){
if(fp.getForm().isValid()){
fp.getForm().submit({
url: 'php/file-upload.php',
waitMsg: 'Uploading your photo...',
success: function(fp, o){
msg('Success', 'Processed file');
}
});
}
}
},{
text: 'Reset',
handler: function(){
fp.getForm().reset();
}
}]
});
的问题是,在我的客户,上传总是处于运行状态,但我没有任何在我的服务器的东西 – 2010-09-14 18:49:06