私は次のコードを持っています:
jQuery.ajax({
type: "POST",
async: true,
url: '/index/city',
data: {massiv: 'qweqwe'},
dataType: "json",
contentType: "application/json; charset=utf-8",
success: function (msg)
{ alert('success') },
error: function (err)
{ console.log(err.responseText);}
});
そして、php側の次のコード:
var_dump($_POST);
実行すると、空白の$_POST
配列が表示されます。ただし、firebugを使用すると、POSTクエリを送信していることがはっきりとわかりますmassiv=qweqwe
。GETタイプでクエリを実行すると、$_GET
問題なく配列で表示できます。
nginxおよびphp-fpmログには何もありません。