cakePHP - 解析错误:语法错误,意外T_STRING

时间:2011-08-11 06:35:01

标签: php cakephp cakephp-1.3

我对此代码有一些错误。 certificate_controller.ctp中的问题

Parse error: syntax error, unexpected T_STRING

function index() {
    $this->Certification->recursive = 0;
    $this->Trainee->recursive = 0;
    //$this->set('certifications', $this->paginate());
    $this->set('viewCertificate',$this->View Certificate->find('list'));
    $this->set('courses',$this->Course->find('list'));
    $this->set('locations',$this->Location->find('list'));
    $this->set('trainees',$this->Trainee->find('list'));
    //$this->Trainee->recursive = 0;

$locations = $this->Location->find('list', array('order'=>'name ASC'));
//$this->set(compact('courses','locations','trainees'));
}

感谢提前

1 个答案:

答案 0 :(得分:5)

我会说这句话有问题:

$this->set('viewCertificate',$this->View Certificate->find('list'));

不确定型号名称是什么,但肯定没有空格。