Bonjour,
j'essaie d'apprendre à utiliser le Zend Framework avec Zend-framework-getstarted. tout fonctionnement correctement jusqu'au Zend_View.
Mon problème survient lorsque je met en place la vue avec :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28 <?php class IndexController extends Zend_Controller_Action { function init() { $this->initView(); } function indexAction() { $this->view->title = "Mes albums"; $this->render(); } function ajouterAction() { $this->view->title = "Ajouter un nouvel album"; $this->render(); } function modifierAction() { $this->view->title = "Modifier un album"; $this->render(); } function supprimerAction() { $this->view->title = "Supprimer un album"; $this->render(); } }
Lors de l'exécution j'obtiens le message d'erreur suivant, on dirait que le framework ne trouve pas mes templates :
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'index/index.phtml' not found in path' in /var/www/zftuto/library/Zend/View/Abstract.php:807 Stack trace:
#0 /var/www/zftuto/library/Zend/View/Abstract.php(718): Zend_View_Abstract->_script('index/index.pht...')
#1 /var/www/zftuto/library/Zend/Controller/Action.php(203): Zend_View_Abstract->render('index/index.pht...')
#2 /var/www/zftuto/application/controllers/IndexController.php(11): Zend_Controller_Action->render()
#3 /var/www/zftuto/library/Zend/Controller/Action.php(501): IndexController->indexAction()
#4 /var/www/zftuto/library/Zend/Controller/Dispatcher/Standard.php(214): Zend_Controller_Action->dispatch('indexAction')
#5 /var/www/zftuto/library/Zend/Controller/Front.php(754): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#6 /var/www/zftuto/index.php(14): Zend_Controller_Front->dispatch()
#7 {main} thrown in /var/www/zftuto/library/Zend/View/Abstract.php on line 807
l'arboressence des répertoires est celle recommandée par le répertoire
le serveur tourne sous Ubuntu 6.10
avec Apache 2 et PHP 5.1.6
Merci d'avance pour vos réponse
Partager