删除功能ThinkPHP

public function mess_delete(){

    $map['id']=I('get.id');
    $data['is_delete']=1;
    $obj = M("Message");

    if($obj->where($map)->save($data)){ 

        $this->success("修改成功",U('/Blog/message'));
    }else{
        $this->success("修改成功",U('/Blog/message'));

    }

}

 <td><a class="link-del" href="{:U('/Blog/mess_delete/id/'.$v['id'])}">删除</a></td>


posted @ 2019-07-18 18:20  孙中明  阅读(132)  评论(0编辑  收藏  举报