public function edi() { $map['id'] = $_GET['id']; if (empty($map['id'])) { $this->error('非法操作!'); } $db = new ArticlesModel(); $rs = $db->relation(true)->where($map)->find(); $this->assign('rs', $rs); $this->display('Index:ediNote'); }
public function view() { $map['id'] = isset($_GET['id']) ? $_GET['id'] : null; $db = new ArticlesModel(); $rs = $db->relation(true)->where($map)->find(); if ($rs['id'] == null || $rs['id'] === false || $map['id'] === null) { $this->error('你请求的页面不存在!'); } $this->assign('rs', $rs); $this->display('Index:article'); //dump($rs); }