Hello,
J'ai changé ma css pour le site que je développe et sans y prêter attention j'ai du modifier quelque chose puisque je n'arrives plus à accéder qu'à ma page index du site et que tout clique sur un lien me renvoie le message suivant :
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (NomProjet)' in C:\wamp\www\NomProjet\library\Zend\Controller\Dispatcher\Standard.php:241 Stack trace: #0 C:\wamp\www\NomProjet\library\Zend\Controller\Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\wamp\www\NomProjet\index.php(30): Zend_Controller_Front->dispatch() #2 {main} thrown in C:\wamp\www\NomProjet\library\Zend\Controller\Dispatcher\Standard.php on line 241
Ce que je ne comprends pas c'est que le NomProjet ne figure nul part dans mon bootstrap et ne peut être là que par rapport à mon .htaccess
Voici mon fichier index.php
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 29 30
| <?php
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors', 1);
date_default_timezone_set('Europe/Paris');
// mise en place des répertoires et chargement des classes
set_include_path('.'
. PATH_SEPARATOR . './library'
. PATH_SEPARATOR . './application/models/'
. PATH_SEPARATOR . get_include_path());
include "Zend/Loader.php";
Zend_Loader::registerAutoload();
// Chargement de la configuration
$config = new Zend_Config_Ini('./application/config.ini', 'general');
$registry = Zend_Registry::getInstance();
$registry->set('config', $config);
//Mise en place de l'access aux données
$db = Zend_Db::factory($config->db);
Zend_Db_Table::setDefaultAdapter($db);
//setup controller
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(true);
$frontController->setControllerDirectory('./application/controllers');
Zend_Layout::startMvc(array('layoutPath'=>'./application/layouts'));
// run!
$frontController->dispatch(); |
et mon .htaccess
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| # Règles de réécriture pour Zend Framework
RewriteEngine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css)$ Vetis/index.php
# Sécurité : Ne pas autoriser le parcours de répertoires
Options -Indexes
# Configuration PHP
php_flag magic_quotes_gpc off
php_flag register_globals off
php_flag short_open_tag on |
Si quelqu'un a une idée , une piste ...
Merci bien
Partager