1 ajax 提交数据时,需要把对象 json化 JSON.stringify(attachObj)
2PHP接收时 需要先反转 预定义的HTML实体,再json反转
$attachObj = json_decode(htmlspecialchars_decode($_POST['attachObj'])); 返回对象
$attachObj = json_decode(htmlspecialchars_decode($_POST['attachObj']),true); 返回数组
1 ajax 提交数据时,需要把对象 json化 JSON.stringify(attachObj)
2PHP接收时 需要先反转 预定义的HTML实体,再json反转
$attachObj = json_decode(htmlspecialchars_decode($_POST['attachObj'])); 返回对象
$attachObj = json_decode(htmlspecialchars_decode($_POST['attachObj']),true); 返回数组