怎样以json格式输出表单提交时的提示信息?

浏览:819 发布日期:2013/07/25 分类:求助交流 关键字: json
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啥再提交吧~~'),
        ); 
求指教
最佳答案
评论( 相关
后面还有条评论,点击查看>>