Error starting application using ZendFramework

0

I started studying the Zendframework and I configured it as recommended. By calling the project I created with the default code, it works perfectly. When I comment all index.php and add the code:

include 'Zend.php';

Zend_Loader::loadClass('Zend_Controller_Front');

Zend_Controller_Front::run('controllers');

Show the following error:

  

Fatal error: Class 'Zend_Loader' not found in   C: \ wamp \ www \ ProjectZend \ public \ index.php on line 5

    
asked by anonymous 20.07.2015 / 15:55

1 answer

1

You need to call the Zend autoloader (Zend / Loader / Autoloader.php):

require_once 'Zend/Loader/Autoloader.php';

CAUTION, a detail can bring problems, linux is case sensitive regarding files. This means that, in linux this

include ('Zend/Loader/autoloader.php');

It's different from this

include ('Zend/Loader/Autoloader.php');
    
21.07.2015 / 01:16