Error starting application using Zendframework

Asked

Viewed 42 times

0

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

include 'Zend.php';

Zend_Loader::loadClass('Zend_Controller_Front');

Zend_Controller_Front::run('controllers');

Shows the following error:

Fatal error: Class 'Zend_loader' not found in C: wamp www Projetozend public index.php on line 5

  • You have to call autoloader: require_once 'Zend/Loader/Autoloader.php';

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 as to the files. This means that in linux this

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

is different from this

include ('Zend/Loader/Autoloader.php');
  • It worked @lai0n with your tip!

Browser other questions tagged

You are not signed in. Login or sign up in order to post.