Witam,
dopiero zaczynam z Zendem i mam, zdaje się bardzo laicki problem.
Podczas gdy próbuje wyświetlić jakiś widok, to otrzymuję błędy
Kod
An error occurred
Application error
IndexController.php
<?php
class IndexController extends Zend_Controller_Action
{
function indexAction()
{
'author' => 'Hernando de Soto',
'title' => 'The Mystery of Capitalism'
),
'author' => 'Henry Hazlitt',
'title' => 'Economics in One Lesson'
),
'author' => 'Milton Friedman',
'title' => 'Free to Choose'
)
);
// now assign the book data to a Zend_View instance
Zend_Loader::loadClass('Zend_View');
$view = new Zend_View();
$view->books = $data;
// and render a view script called "booklist.php"
echo $view->render('booklist.php'); }
}
./application/views/booklist.php
<?PHP if ($this->books): ?>
<!-- A table of some books. -->
<table>
<tr>
<th>Author</th>
<th>Title</th>
</tr>
<?php foreach ($this->books as $key => $val): ?>
<tr>
<td>
<?php echo $this->escape($val['author']) ?></td>
<td>
<?php echo $this->escape($val['title']) ?></td>
</tr>
<?php endforeach; ?>
</table>
<?php else: ?>
<p>There are no books to display.</p>
<?php endif;?>