Am using Zend framework along with zend studio. Am confused with following files
1)Bootsrap.php
2).htaccess
3)application.ini
4) index.php
I have edited all these files to run my applicaiton on Virtaul host. However I have confused with above mentioned file, as which code goes in which file.
Also Am getting error, when I created new project using zend studio
“Uncaught exception ‘Zend_Application_Bootstrap_Exception’ with message ‘No default controller directory registered with front controller’ in”
if you can give some guidelines on the above will be great
Thanks,
index.phpis the PHP script that acts as the gateway to your entire application. This script creates yourZend_Application, bootstraps it and runs it..htaccessis used by Apache to route all requests to non-existent files and directories to yourindex.phpscript so that Zend Framework can handle the URLs and route them to the appropriate module, controller and action.Bootstrap.phpcan be used to write blocks of code to bootstrap (set up) require parts of your application (e.g. database connection, sessions, paths etc). The bootstrap is called almost immediately after your application starts running and before any routing, dispatching or anything takes place.application.iniis also used to configure your application. Much of what can be done in theBootstrap.phpfile can be done in theapplication.inifile. There are a number of resource plugins available that can take configuration in yourapplication.inifile and set up specific aspects of your application.Most of what you can do using PHP code in your Bootstrap, can also be done in
application.iniusingininotation instead of code, which is often easier for certain people to maintain.The Zend Framework MVC Theory of Operation covers some points of interest that I think would be helpful in understanding the bootstrap process.
To resolve the error you are getting, try adding this line to your
application.ini:This makes use of the aforementioned resource plugins, in specific the
FrontControllerresource plugin which sets up the front controller.