ERRO:
Warning: include_once(Produtos.php) [function.include-once]: failed to open stream: No such file or directory in C:\xampp\htdocs\ZF\library\Zend\Loader.php on line 146
Warning: include_once() [function.include]: Failed opening 'Produtos.php' for inclusion (include_path='.:C:\xampp\htdocs\ZF\library;C:\xampp\htdocs\ZF\library') in C:\xampp\htdocs\ZF\library\Zend\Loader.php on line 146
Fatal error: Uncaught exception 'Zend_Exception' with message 'File "Produtos.php" does not exist or class "Produtos" was not found in the file' in C:\xampp\htdocs\ZF\library\Zend\Loader.php:99 Stack trace: #0 C:\xampp\htdocs\ZF\booba\application\controllers\IndexController.php(17): Zend_Loader::loadClass('Produtos') #1 C:\xampp\htdocs\ZF\library\Zend\Controller\Action.php(133): IndexController->init() #2 C:\xampp\htdocs\ZF\library\Zend\Controller\Dispatcher\Standard.php(268): Zend_Controller_Action->__construct(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http), Array) #3 C:\xampp\htdocs\ZF\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(Object(Zend_Controller_Request_Http), Object(Zend_Controller_Response_Http)) #4 C:\xampp\htdocs\ZF\booba\index.php(97): Zend_Controller_Front->dispatch() #5 {main} thrown in C:\xampp\htdocs\ZF\library\Zend\Loader.php on line 99
IndexController:
class IndexController extends Zend_Controller_Action
{
public function init()
{
Zend_Loader::loadClass('Produtos');
}
public function indexAction()
{
$view = Zend_Registry::get('view');
$table = new Produtos();
$produtos = $table->fetchAll('promocao');
$view->assign('produtos',$produtos);
$view->assign('header','pageheader.phtml');
$view->assign('body','index/bodyindex.phtml');
$view->assign('footer','pagefooter.phtml');
$view->render($this,'default.phtml');
}
}
?>
Edição feita por: HELLFROST, 19/06/2011, 17:48.