//前端数据提交
$('#submit').on("click",function (event) {
alert("hao");
$.ajax({
type: "POST",
url: "{:url('Ruku/tianjia')}",
data: $("#form-admin-add").serialize(),
dataType: "json",
success: function(data){
alert(data);
}
});
});
//后台控制器是这样接收的
$param = $request -> param();
echo "<pre>";
print_r($paraam);
die;
无法打印出来
你换成下面这样试试:
$param = $this->request->param();