f.sauter
5 Dec 2010, 3:35 PM
Hey all,
I have a problem to use the RestProxy (http://dev.sencha.com/deploy/touch/docs/source/RestProxy.html#cls-Ext.data.RestProxy) together with a PHP backend.
JS:
...
Ext.regModel('Message', {
fields: [
{name: 'id', type: 'int'},
{name: 'text', type: 'string'}
],
proxy: {
type: 'rest',
url : 'controller.php'
}
});
var message = Ext.ModelMgr.create({text: 'My Message!'}, 'Message');
message.save();
...
PHP (controller.php):
<?
print_r($_REQUEST);
print_r($_SERVER["REQUEST_METHOD"]);
?>
Results in (Firebug output):
Array
(
[_dc] => 1291591418769
)
POST
So, the question is, where is my passed data? I hope anyone can give me a hint. Thanks in advance!
cheers
I have a problem to use the RestProxy (http://dev.sencha.com/deploy/touch/docs/source/RestProxy.html#cls-Ext.data.RestProxy) together with a PHP backend.
JS:
...
Ext.regModel('Message', {
fields: [
{name: 'id', type: 'int'},
{name: 'text', type: 'string'}
],
proxy: {
type: 'rest',
url : 'controller.php'
}
});
var message = Ext.ModelMgr.create({text: 'My Message!'}, 'Message');
message.save();
...
PHP (controller.php):
<?
print_r($_REQUEST);
print_r($_SERVER["REQUEST_METHOD"]);
?>
Results in (Firebug output):
Array
(
[_dc] => 1291591418769
)
POST
So, the question is, where is my passed data? I hope anyone can give me a hint. Thanks in advance!
cheers