Autoloading Zend Framework 2 packages with the StandardAutoloader
问题 I was previously using a downloaded version of Zend Framework 2 and was basically able to do something like this: // Set include paths (add Zend to the path) set_include_path(get_include_path() . PATH_SEPARATOR . $__CONFIG['zendPath']); // Setup the Zend Autoloader require_once('library\Zend\Loader\StandardAutoloader.php'); $autoLoader = new StandardAutoloader(array( 'namespaces' => array( 'Zend' => $__CONFIG['zendPath'] . '/library/Zend' ) )); This works because all Zend packages are inside