Módulos no Zend
Pessoal, eu estou criando módulos chamados default e admin
se eu tentar acessar: http://localhost/segs, ele entra no meu default sem problemas
agora, se eu tentar acessar http://localhost/segs/admin, ele me ret---a o seguinte erro:
exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (segs)' in C:\xampplite\htdocs\SEGS\library\Zend\Controller\Dispatcher\Standard.php:241 Stack trace: #0 C:\xampplite\htdocs\SEGS\library\Zend\Controller\Front.php(934): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 C:\xampplite\htdocs\SEGS\index.php(47): Zend_Controller_Front->dispatch() #2 {main}
E o pior, é que acontece o mesmo erro se eu acessar: http://localhost/segs/default
Segue abaixo foto da estrutura dos meus diretórios, o conteudo da index.php e o conteudo do meu .htaccess dentro do diretorio raiz do meu projeto(/segs):
Minha estrutura:
/applications/core/interface/imageproxy/imageproxy.php?img=http://img14.imageshack.us/img14/1299/zendestrutura3.jpg&key=b9ee0e283b1b2485015acedf14986919a81e8b3bcff1fb661dae900a5d0d2eb6" alt="Imagem Postada" />
Meu .htaccess:
Rewrite Engine config
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(gif|jpg|png|css|js|controller.php|tpl|trans.php|service.php)$ index.php
Coloca UTF-8 como charset padrao
AddDefaultCharset utf-8
Desabilita a auto insercao de escapes (\)
php_flag magic_quotes_gpc off
Desabilita as Variaveis globais
php_flag register_globals off
Minha index.php:
//Define Control of Errors
error_reporting(E_ALL|E_STRICT);
ini_set('display_errors','on');
//Define Application Configuration
setlocale(LC_ALL, 'BRA');
date_default_timezone_set('America/Sao_Paulo');
//Define Charset
header('Content-type: text/html; charset=UTF-8');
//Define Application Path
define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application/'));
//Set Path
set_include_path('.' . PATH_SEPARATOR . './library'
. PATH_SEPARATOR . './application/modules/admin/models'
. PATH_SEPARATOR . './application/modules/admin/views/scripts/'
. PATH_SEPARATOR . get_include_path());
//Include AutoLoad
require_once "./library/Zend/Loader.php";
Zend_Loader::registerAutoload();
$post = new Zend_Filter_Input(NULL,NULL,$_POST);
$post->setDefaultEscapeFilter(new Zend_Filter_StringTrim());
$get = new Zend_Filter_Input(NULL,NULL,$_GET);
$get->setDefaultEscapeFilter(new Zend_Filter_HtmlEntities(ENT_COMPAT, 'UTF-8'));
Zend_Registry::set('post', $post);
Zend_Registry::set('get', $get);
//Setup The Frontcontroller
$f = Zend_Controller_Front::getInstance();
$f->setModuleControllerDirectoryName ( 'controllers' );
$f->addModuleDirectory ( APPLICATION_PATH . '/modules' );
$f->throwExceptions(TRUE);
//Dispatch
//RUN The Application
try {
$f->dispatch();
}catch (Exception $e){
echo $e;
}Discussão (11)
Carregando comentários...