0
我有一個像下面的AJAX函數,它將發送一個Json數據到PHP文件,我怎樣才能獲得這些數據在PHP文件?我該如何獲得JSON數據通過AJAX函數通過PHP
$.ajax({
type: 'POST',
url: 'data11.php',
data: {
json: ko.toJSON(viewModel)
},
success: function() {}
});
我的JSON數據是一樣的東西下面
{"participants":[{"NoPrticiField":1,"empname":"gfh","designation":"fh","email":"fgh"},{"NoPrticiField":2,"empname":"fgh","designation":"fgh","email":"fgh"}]}:
'json_decode($ _ POST [ 'JSON']);' – k102