我试了$p=I("post.");不行
前台是:
function getRows(){
var rows = $('#dg_shendan').datagrid('getRows');
var ids =JSON.stringify(rows);
$.ajax({
type:"post",
url:'{:U('ME/Sd/test1')}',
data:ids,[code][/code] });
alert(ids);
}
后台是:
public function test1(){ //测试缓存页
$p=I("post.");
dump(json_decode($_POST));
$tmp=S("tmp");
dump($tmp)
}
后台要怎么获取前台data:ids,的数据? 我想把这段json数据保存到数据库字段里
最佳答案