correct JSONP Response
问题 I'm trying locally to get JSONP to give me a correct response and pass it into my callback function jsonp_callback. Using code from: How do I set up JSONP? header('content-type: application/json; charset=utf-8'); $data = array ('a'=>1,'b'=>2,'c'=>3,'d'=>4,'e'=>5); echo $_GET['jsonpCallback'] . '('.json_encode($data).')'; and $.ajax({ url: 'jsonp-response.php', dataType:'jsonp', jsonp: 'jsonp_callback', success: function (r){ console.log(r); } }); function jsonp_callback (r){ console.log(