Jump to content


HELLFROST

Member Since 10/04/2007
Offline Last Active 06/08/2011, 20:48
-----

Topics I've Started

Loader.Php Não Reconhece A Classe

19/06/2011, 17:45

Ola amigos, sou novo aqui, espero que tenha feito o Post correto e de para entender, que o Loader.php nao esta encontrando a Classe Produtos e assim chamando a pagina Produtos.php. Ja olhei la no PHP.INI e ja esta liberado os PDO: extension=php_pdo_mysql.dll e extension=php_pdo.dll


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');
}

}
?>

IPB Skin By Virteq