PHP server does not receive backbone.js POST

Using backbone.js, I call model.save () also through firebug. I see that my model JSON string is indeed sent to the model url.

I tried searching in all variables, but could not find any data. $ _REQUEST indicates that POST is a method. But $ _POST is completely empty.

I use a very simple PHP page:

<?php
var_dump($_GET);
var_dump($_POST);
var_dump($_REQUEST);
?>

Answer call save / sync

array
  empty

array
  empty

array
  empty

How do I get the PHP source code to get the JSON string of the model that was POSTED? Any thanks are grateful.

Edit : for everyone who is interested, I did this from the Rayno link:

<?php
    parse_str(file_get_contents("php://input"),$post_vars);
    var_dump($post_vars);
?>
+3
source share
1 answer

Are you sure they were sent to the server? You can check the connection between the browser / server using tools such as Fiddler or in the Firebugs 'Net' console.

+1
source

All Articles