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
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" } }
./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> </tr> <?php endforeach; ?> </table> <?php else: ?> <p>There are no books to display.</p> <?php endif;?>