Advertisement
Guest User

Untitled

a guest
Sep 19th, 2014
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.64 KB | None | 0 0
  1. $.post('/', {a:100, b:'test'}, function(data){
  2. }, 'json');
  3.  
  4. Content-Type application/x-www-form-urlencoded; charset=UTF-8
  5.  
  6. PHP Deprecated: Automatically populating $HTTP_RAW_POST_DATA is deprecated and will be removed in a future version. To avoid this warning set 'always_populate_raw_post_data' to '-1' in php.ini and use the php://input stream instead
  7.  
  8. json_decode(file_get_contents("php://input"));
  9.  
  10. PHP Warning: First parameter must either be an object or the name of an existing class
  11.  
  12. a=100&b="test"
  13.  
  14. parse_str(file_get_contents("php://input"), $data);
  15. $data = json_decode(json_encode($data));
  16. var_dump($data);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement