getContext()->getRequest(); // 接收信息 $id = intval($request->getParameter('id')); $uploadImg = addslashes(trim($request->getParameter('uploadImg'))); // 图片上传位置 $sql = "select * from lkt_set_notice where id='$id'"; $r = $db->select($sql); $image = $r[0]->img_url; @unlink ($uploadImg.$image); $sql = "delete from lkt_set_notice where id='$id'"; $res = $db -> delete($sql); if($res > 0){ header("Content-type:text/html;charset=utf-8"); echo ""; }else{ header("Content-type:text/html;charset=utf-8"); echo ""; } return; } public function execute(){ return $this->getDefaultView(); } public function getRequestMethods(){ return Request :: NONE; } } ?>