Bonjour,

je suis en train de suivre le tutoriel : http://akrabat.com/zend-framework-tutorial/

Mais j'ai un soucis :

Dans la page 7 du tuto, on me demande de tester les nouvelles actions précédemment ajouter dans le Controlleur : IndexController.php grâce à cette commande :

zf create action add Index
zf create action edit Index
zf create action delete Index

Les méthodes se sont créées, mais lorsque je teste sur le site internet :

http://localhost/zf-tutorial/public/add

J'ai une erreur :

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
An error occurred
Page not found
Exception information:
 
Message: Invalid controller specified (add)
Stack trace:
 
#0 C:\wamp\www\zf-tutorial\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http))
#1 C:\wamp\www\zf-tutorial\library\Zend\Application\Bootstrap\Bootstrap.php(97): Zend_Controller_Front->dispatch()
#2 C:\wamp\www\zf-tutorial\library\Zend\Application.php(366): Zend_Application_Bootstrap_Bootstrap->run()
#3 C:\wamp\www\zf-tutorial\public\index.php(26): Zend_Application->run()
#4 {main}  
 
Request Parameters:
 
array (
  'controller' => 'add',
  'action' => 'index',
  'module' => 'default',
)
mais si je tape dans l'url : http://localhost/zf-tutorial/public/index/add

Le message s'affiche correctement :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
View script for controller Index and script/action name add

Voici mon fichier .htaccess :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
 
 
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
SetEnv APPLICATION_ENV development
je ne sais pas quoi faire pour que cela marche normalement...

Si quelqu'un a une astuce