Mam nastepujący problem:
Mam pliki:
public\index.php:
<?php date_default_timezone_set('Europe/London'); . PATH_SEPARATOR . '../application/models/' require_once "Zend/Loader/Autoloader.php"; $autoloader = Zend_Loader_Autoloader::getInstance(); $autoloader->setFallbackAutoloader(true); $frontController = Zend_Controller_Front::getInstance(); $frontController->throwExceptions(true); $frontController->setControllerDirectory('../application/controllers'); $frontController->dispatch();
application/controllers/IndexController.php:
<?php class IndexController extends Zend_Controller_Action { public function init() { $this->view->baseUrl = $this->_request->getBaseUrl(); Zend_Layout::startMvc(); } function indexAction() { $this->view->title = "Strona główna"; } }
application/controllers/SpisController.php:
<?php class SpisController extends Zend_Controller_Action { public function init() { $this->view->baseUrl = $this->_request->getBaseUrl(); Zend_Layout::startMvc(); } function indexAction() { $this->view->title = "Spis"; } }
applications/views/scripts/layout.phtml
applications/views/scripts/index/index.phtml i applications/views/scripts/spis/index.phtml, które wyglądają tak:
Problem polega na tym, że w chwili klikania na drugi link tj. do akcji z kontrolera spis wyskakuje mi błąd 404, że nie znajduje pliku na serwerze i nie wiem dlaczego tak się dzieje. Co do kontrolera index to wszystko działa jak należy.
Za wszelką pomoc będę wdzięczny.