《PHP Web2.0 开发实战》学习笔记1
学习《PHP Web2.0 开发实战》中ZF的使用,刚创建了简单的IndexController类,想看一下效果,结果出现错误:
问题1:
Notice: Zend_Loader::Zend_Loader::registerAutoload is deprecated as of 1.8.0 and will be removed with 2.0.0; use Zend_Loader_Autoloader instead in D:\PHPServer\zend\library\Zend\Loader.php on line 266
require_once('Zend/Loader/Autoloader.php');$loader = Zend_Loader_Autoloader::getInstance();
Fatal error: Uncaught exception 'Zend_Controller_Dispatcher_Exception' with message 'Invalid controller specified (error)' in D:\PHPServer\zend\library\Zend\Controller\Dispatcher\Standard.php:248 Stack trace: #0 D:\PHPServer\zend\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #1 D:\PHPRoot\phpweb20\htdocs\index.php(10): Zend_Controller_Front->dispatch() #2 {main} thrown in D:\PHPServer\zend\library\Zend\Controller\Dispatcher\Standard.php on line 248
$frontController->setParam('useDefaultControllerAlways', true);
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'index/index.phtml' not found in path (d:/phproot/phpweb20/include/views\scripts/)' in D:\PHPServer\zend\library\Zend\View\Abstract.php:980 Stack trace: #0 D:\PHPServer\zend\library\Zend\View\Abstract.php(876): Zend_View_Abstract->_script('index/index.pht...') #1 D:\PHPServer\zend\library\Zend\Controller\Action\Helper\ViewRenderer.php(897): Zend_View_Abstract->render('index/index.pht...') #2 D:\PHPServer\zend\library\Zend\Controller\Action\Helper\ViewRenderer.php(918): Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...', NULL) #3 D:\PHPServer\zend\library\Zend\Controller\Action\Helper\ViewRenderer.php(957): Zend_Controller_Action_Helper_ViewRenderer->render() #4 D:\PHPServer\zend\library\Zend\Controller\Action\HelperBroker.php(277): Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #5 D:\PHPServer\zend\library\Zend\Controller\Action.php(523): Zend_Controller_Action_HelperBroker->notifyPostDispatch() #6 D:\PHPServe in D:\PHPServer\zend\library\Zend\View\Abstract.php on line 980
Fatal error: Call to a member function fetch() on a non-object in D:\PHPRoot\phpweb20\include\Templater.php on line 58