how do i auto load zend framework classes when i am not using the MVC framework?
相关问题
- Zend Auth locked session
- Zend/PHP: Problem uploading/downloading file to/fr
- PHP Zend Framework - Zend_Config and global state
- 'Zend_Db_Statement_Exception' with message
- How to handle with foreign languages?
相关文章
- Possible disadvantages of Zend [closed]
- Zend Framework Modules with common resources
- Zend Form Validator Callback: How to exclude a use
- Exception while setting up the wurfl in zend
- How to create admin in Zend framework?
- zend framework and jquery - attach event from serv
- Magento: Programatically update cart via event
- move_uploaded_file() with Zend doens't
See: http://us.php.net/manual/en/language.oop5.autoload.php
The nice thing about the Zend framework is that it's extremely modular, you can use just about any piece of it you want without adopting the whole thing.
For example, we can use
Zend_Loader_Autoloader
to set up class auto-loading without having to useZend_Application
First make sure the Zend library is in your include path:
Then require the Autoloader class:
Then we set up the autoloader:
Once the auto-loader is set up (preferably in a bootstrap or something), you can call Zend framework classes (or your own app's classes) without having to require them individually:
Read more about it in the documentation