Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/neo4j/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Sencha touch 从存储发送POST请求_Sencha Touch_Extjs4_Extjs_Extjs Mvc_Extjs4.1 - Fatal编程技术网

Sencha touch 从存储发送POST请求

Sencha touch 从存储发送POST请求,sencha-touch,extjs4,extjs,extjs-mvc,extjs4.1,Sencha Touch,Extjs4,Extjs,Extjs Mvc,Extjs4.1,这是我的商店课程。我正在尝试完成一个POST请求。这是我的密码; 一切正常,当我从Firebug检查时,我也得到了服务器响应。但唯一的问题是,当我在firefox中检查参数选项卡时,我看到\u dc 1341141752113,当我在firebug中检查Post选项卡时,我看到 limit 25 page 1 start 0 1.)这些是一些我在代码中没有通过的问题。我为什么要买这些 Ext.define('Pro.store.Animal',{ extend:'Ext.

这是我的商店课程。我正在尝试完成一个POST请求。这是我的密码; 一切正常,当我从Firebug检查时,我也得到了服务器响应。但唯一的问题是,当我在firefox中检查
参数选项卡时,我看到
\u dc 1341141752113
,当我在firebug中检查
Post选项卡时,我看到

limit   25
page    1
start   0
1.)这些是一些我在代码中没有通过的问题。我为什么要买这些

Ext.define('Pro.store.Animal',{
    extend:'Ext.data.Store',
    model:'Pro.model.Animal',

    proxy: {
        actionMethods : {

            read   : 'POST'
        },
        type: 'ajax',
        url : '/projectmy/animal.php'

    }

    });

2.)如果我想向PHP文件传递参数,我应该如何编辑代码来传递参数?

这些参数是默认值。如果您使用分页工具栏或其他控件在数据中导航,则需要它们。
对于其他参数,您可以使用。

这些参数是默认值。如果您使用分页工具栏或其他控件在数据中导航,则需要它们。 对于其他参数,可以使用

myreadPhp.php
将需要参数
yourname参数
yourageparamete


myreadPhp.php
将需要参数
yournameparameter
yourageparamete

添加到这个答案中,\u dc是自动添加的“缓存破坏”参数,以确保每次调用唯一的url。请参阅Ext.data.proxy.Server类中的noCache参数。除此之外,_dc是自动添加的“缓存破坏”参数,以确保每次调用唯一的url。请参阅Ext.data.proxy.Server类中的noCache参数。是否可以获取有关您的2.)的任何信息?我也有同样的问题。我无法将任何参数传递给PHP脚本。请看下面的答案,我已经为存储添加了代码。它应该对你有帮助。(我假设你的PHP脚本没有问题)你能得到关于你的PHP脚本的任何信息吗?我也有同样的问题。我无法将任何参数传递给PHP脚本。请看下面的答案,我已经为存储添加了代码。它应该对你有帮助。(我假设您的PHP脚本没有问题)
Ext.define('App.store.StoreName', {
    extend: 'Ext.data.Store',

    requires: [
        'App.model.StoreName'
    ],

    constructor: function(cfg) {
        var me = this;
        cfg = cfg || {};
        me.callParent([Ext.apply({
            storeId: 'stid',
            model: 'App.model.MyModel',
            proxy: {
                type: 'ajax',
                actionMethods: 'POST',
                api: {
                    read: '../myreadPhp.php',

                },
                reader: {
                    type: 'json'
                }
            },
            listeners: {
                beforeload: {
                    fn: me.onArraystoreBeforeLoad,
                    scope: me
                }
            }
        }, cfg)]);
    },

    onArraystoreBeforeLoad: function(store, operation, options) {
        this.proxy.extraParams.yournameparameter = "pass some name here"; 
        this.proxy.extraParams.yourageparamete = "pass your age here"; 
    }

});