Home  >  Article  >  Backend Development  >  cakephp有关问题

cakephp有关问题

WBOY
WBOYOriginal
2016-06-13 12:40:57790browse

cakephp问题
这个是我写的代码:

<?php <br />
  class BooksController extends AppController<br />
  {<br />
  	var $name='Books';<br />
  	var $help='form';<br />
function index() { <br />
$this->Book->recursive = 1; <br />
$books = $this->Book->find('all',array('field'=>array('Book.isbn','Book.title','Author.name'))); <br />
$this->set('books', $books); <br />
} <br />
function add()<br />
{<br />
   if(!empty($this->data))<br />
   {<br />
      $this->Book->create();<br />
      $this->Book->save($this->data);<br />
      $this->redirect(array('action'=>'index'));<br />
   }<br />
    $authors = $this->Book->Author->generateList();<br />
      $this->set('$authors',$authors);<br />
}<br />
} 		<br />
?>

然后出现这个问题

该怎样解决呢?

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn