if ($_POST){
$data['artice_id']=$_POST['artice_id'];
$data['msg_name']=strip_tags($_POST['u_name']);
$data['msg_content']=strip_tags($_POST['msg_content']);
$data['date']=date("Y-m-d",time());
if ($data['msg_content']==""){
$notic['info']="提交的内容不能为空";
$notic['status']=0;
}else{
$msg=M('message');
$result=$msg->add($data);
if ($result){
$notic['info']="留言成功";
$notic['status']=1;
}else{
$notic['info']="提交失败";
$notic['status']=0;
}
}
$this->ajaxReturn($notic);
} 最佳答案