wykonalem poszczegolne kroki w nim zawarte to jest storzylem strukture katalogow, umiescilem Zend w bibliotekach
bootstraper wyglada :
<?php date_default_timezone_set('Europe/London'); . PATH_SEPARATOR . './application/models/' include "Zend/Loader.php"; Zend_Loader::loadClass('Zend_Controller_Front'); // setup controller $frontController = Zend_Controller_Front::getInstance(); //$frontController->setBaseUrl('/zf-tutorial/'); $frontController->throwExceptions(true); $frontController->setControllerDirectory('./application/controllers'); // run! $frontController->dispatch(); ?>
IndexController
<?php class IndexController extends Zend_Controller_Action { function indexAction() { } function addAction() { } function editAction() { } function deleteAction() { } } ?>
plik .htaccess
RewriteEngine on
RewriteRule .* index.php
php.ini
php_flag magic_quotes_gpc off
php_flag register_globals off
próbuje wywolac adres http://localhost:88/zf-tutorial ktory ma pokazac nazwe akcji
i dostaje fatal error
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'index/index.phtml' not found in path (.\application\views\scripts\)' in C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\View\Abstract.php:857 Stack trace: #0 C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\View\Abstract.php(765): Zend_View_Abstract->_script('index/index.pht...') #1 C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(895): Zend_View_Abstract->render('index/index.pht...') #2 C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(916): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...', NULL) #3 C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(955): Zend_Controller_Action_Helper_ViewRenderer->render() #4 C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\Controller\Action\HelperBroker.php(161): Zend_Controller_Action_Helper_ViewRenderer->postDispatch( in C:\Program Files\WebServ\httpd\zf-tutorial\library\Zend\View\Abstract.php on line 857
Nie wiem w czym jest problem - czy w apache cos jeszcze musze ustawiac ? Mam zainstalowen WebServ na porcie 88