这个一般是什么错误··没搞懂

浏览:374 发布日期:2013/10/23 分类:求助交流
:(
syntax error, unexpected ';', expecting T_FUNCTION
错误位置
FILE: C:\AppServ\www\test\App\Lib\Action\FormAction.class.php  LINE: 21

这个一般是什么错误··没搞懂

以下是代码class FormAction extends Action{
    public function insert(){
        $Form   =   D('Form');
        if($Form->create()) {
            $result =   $Form->add();
            if($result) {
                $this->success('操作成功!');
            }else{
                $this->error('写入错误!');
            }
        }else{
            $this->error($Form->getError());
        }
    }
    public function read($id=0){
    $Form   =   M('Form');
    // 读取数据
    $data =   $Form->find($id);
    if($data) {
        $this->data = $data;// 模板变量赋值
    }else{
        $this->error('数据错误');
    }
    $this->display();
    }
    public function edit($id=0){
    $Form   =   M('Form');
    $this->vo   =   $Form->find($id);
    $this->display();
    }
    public function update(){
        $Form   =   D('Form');
        if($Form->create()) {
            $result =   $Form->save();
            if($result) {
                $this->success('操作成功!');
            }else{
                $this->error('写入错误!');
            }
        }else{
            $this->error($Form->getError());
        }
    }
}
最佳答案
评论( 相关
后面还有条评论,点击查看>>