Ajax-
Requests获取整个站点。因此,您不会在变量中获取任何数据,而会在数据参数中获取整个站点。您一起做的所有回声都将在此参数中。如果要检索数组,则应先将其转换为json。
echo json_enpre($myArray);
然后,您可以通过Ajax以这种方式接收它
$.ajax({ url: '/my/site', data: {action: 'test'}, dataType: 'json', type: 'post', success: function(output) { alert(output); } });


