Witam
Zaczynam dopiero przygodę z zend
framework i od razu na początku pojawiły się problemy z wgraniem frameworka.
Mam serwer postawiony za pomocą
WebServ.
Mam
następującą strukturę katalogów
zf-tutorial/ /application /controllers /models /views /filters /helpers /scripts /library /public /images /scripts /styles
W folderze zf-tutorial utworzyłem plik .htaccess z zawartością
Kod
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
Oraz plik index.php z zawartością
<?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->throwExceptions(true); $frontController->setControllerDirectory('./application/controllers'); // run! $frontController->dispatch();
Oraz plik IndexController.php w folderze application\controllers\ IndexController.php
O zawartości
class IndexController extends Zend_Controller_Action { public function init() { /* Initialize action controller here */ } public function indexAction() { } }
I wywala mi błąd
Kod
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-users\zf-tutorial\library\Zend\View\Abstract.php:976 Stack trace: #0 C:\Program Files\WebServ\httpd-users\zf-tutorial\library\Zend\View\Abstract.php(876): Zend_View_Abstract->_script('index/index.pht...') #1 C:\Program Files\WebServ\httpd-users\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(897): Zend_View_Abstract->render('index/index.pht...') #2 C:\Program Files\WebServ\httpd-users\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(918): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...', NULL) #3 C:\Program Files\WebServ\httpd-users\zf-tutorial\library\Zend\Controller\Action\Helper\ViewRenderer.php(957): Zend_Controller_Action_Helper_ViewRenderer->render() #4 C:\Program Files\WebServ\httpd-users\zf-tutorial\library\Zend\Controller\Action\HelperBroker.php(277): Zend_Controller_Actio in C:\Program Files\WebServ\httpd-users\zf-tutorial\library\Zend\View\Abstract.php on line 976
Proszę o pomoc.