if ($Guestbook -> create()) {
$result = $Guestbook -> add();
if ($result) {
$this -> success('操作成功!');
} else {
$this -> error('写入错误!');
}
} else {
$this -> error($Guestbook -> getError());
}// 定义自动验证
protected $tableName = 'guestbook_content';
protected $_validate = array(
array('email', 'email', 'E-mail格式不对'),
array('content', 'require', '亲,说点er啥再提交吧~~'),
); 求指教 最佳答案