Extjs &

0 Cevap php

I use the UploadFile example in EXTJS (http://dev.sencha.com/deploy/dev/examples/form/file-upload.html) but I don't know what to write in the server side to save the uploaded file (in php) help me please

Benim istemci tarafında kod:

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();
        }
    }]
});

0 Cevap