+ -
当前位置:首页 → 问答吧 → 求解问题!

求解问题!

时间:2011-11-29

来源:互联网

我的代码是这样的 <?php
public function index()
{
  $Form = D("Form")->select();//也可以D("Form")->findAll()
  $data=$Form->order('id desc')->select();
  $this->assign('data','$data');
  $this->assign('title','添加数据');//定义标题的模板变量
        $this->display();//渲染模板
}
  ?>
可是出现了Parse error: syntax error, unexpected T_PUBLIC in E:\web\aa\Myapp\Lib\Action\IndexAction.class.php on line 2
这样的错误,请问我到底是哪里错了,要怎样修改呢?谢谢大家啊!

作者: xinqingch   发布时间: 2011-11-29

需要补习下OOP的知识和PHP语法先

作者: thinkphp   发布时间: 2011-11-29