我在MVC文件夾中命名時遇到問題,爲什麼會出現以下錯誤。Zend Framework中MVC文件夾結構的正確方法
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script'browsing-
history/browsinghistory.phtml' not found in path (C:/xampp/htdocs/test_app/application
/views\scripts/)' in C:\xampp\htdocs\test_app\library\Zend\View\Abstract.php:988 Stack
trace: #0 C:\xampp\htdocs\test_app\library\Zend\View\Abstract.php(884):
Zend_View_Abstract->_script('browsing-histor...') #1 C:\xampp\htdocs\test_app\library
\Zend\Controller\Action\Helper\ViewRenderer.php(900):
Zend_View_Abstract->render('browsing-histor...') #2 C:\xampp\htdocs\test_app\library
\Zend\Controller\Action\Helper\ViewRenderer.php(921):
Zend_Controller_Action_Helper_ViewRenderer->renderScript('browsing-histor...', NULL)
#3 C:\xampp\htdocs\test_app\library\Zend\Controller\Action\Helper
\ViewRenderer.php(960): Zend_Controller_Action_Helper_ViewRenderer->render() #4
C:\xampp\htdocs\test_app\library\Zend\Controller\Action\HelperBroker.php(277):
Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #5 C:\xampp\htdocs\test_app
\library\Zend\Controller\Action.php in C:\xampp\htdocs\test_app\library\Zend\View
\Abstract.php on line 988
這是我的控制器
class BrowsingHistoryController extends Zend_Controller_Action{//my actions }
這是我的行動
public function browsinghistoryAction(){}
,這是在腳本
scripts
->BrowsingHistory
->browsinghistory.phtml
我的文件夾結構,我也做了同樣的事情我的控制器這是工作e不知道爲什麼這不起作用?任何想法
我只是編輯我的帖子來解釋邏輯。 – Liyali 2012-02-21 12:58:59