A simple config file (application / configs / application.ini)
来源:互联网 发布:网络游戏软件出售 编辑:程序博客网 时间:2024/04/29 10:28
We will need this configuration file to setup some default values for our application. We will see in the next tutorial how the index.php uses this file and passes its values to the application class to create an instance.
As you can see we have three parts in our configuration file, a config setp for the production environment. Another for the testing environment which inherits the values set for the production mode but changes some values. Finally a setup for the development environment which inherits the values from testing mode (and therefore also from production mode) but also changes some values.
In the php settings part we disable error messages in production mode but enable them for the other environments.
The second part sets the path to our library folder.
The fourth part sets the application directory path and sets the name we want to use for our bootstrap file.
The fifth part liste the modules we will add to our application, i will use those values in different parts of my application, more about this in one of my next tutorials.
In the sixth part we set some values for the frontcontroller. We will put our modules in a folder called "modules" and we will use homepage as name for our main (default) module. The name of the default controller will be "index" and the default action will have the name "index". The next value tells zend framework to use a prefix for the default module. By default zend framework allows you to ommit the prefix for the files in the default module folder. I set this value to true because there are so much things you have to explain to somebody that is new to zend framework, that's why i prefer not having to explain which module is the default one and that only for this module you should not use a prefix. I set throw exceptions to false, because i dont want exceptions to popup as soon as they get thrown. If you set throwExceptions to true the try / catch in our index file will handle the error. I want to use the error controller that we will build during one of the next tutorials. In the last key / value pair we set the application environment we have set in the htaccess and defined in the index.php so that zend framework can pass it to the frontcontroller.
The last part is for website "myapp" specific values, right now we only need one value, the default title for the title tag in our html pages.
Those are all the values we want to use for our production environment, our testing and development environments will inherit those values, but we will also override some of them.
We will add lots more value / pair later in other tutorials but right now its already more then enough to get started.
- A simple config file (application / configs / application.ini)
- A simple QT application
- A Simple Socket Application
- Run a simple application
- A simple java application.
- Creating a Simple Direct2D Application
- Duplicate application configs: <dubbo:application错误
- Create a simple application with ROR
- Creating a Simple BSP Application Using AJAX
- Java - a simple JMS client application
- java.lang.IllegalStateException: Duplicate application configs: <dubbo:application
- Creating a CAB file for your application
- Create a P2P file-sharing application
- Creating a Simple Web Application Using a MySQL Database
- ZendFrameWork application.ini配置
- Zend Framework1-application.ini
- Design a simple service-oriented J2EE application framework 读书笔记
- Creating a Simple Web Application in NetBeans Using MySQL(1)
- 在sata上安装RHEL4WS
- javascript + css 实现div层的伸缩(仅高度)-可设置初始慢慢展开
- eclipse查看euc-jp编码格式的文件
- JAVA画图方式一
- 在web.xm里配置了OpenSessionInViewFilter引起Hibernate session问题
- A simple config file (application / configs / application.ini)
- java 画图方式二
- 战隼的学习探索
- IE和firefox中不经过代理IP段设置的不同
- Linux下查看某个端口在运行什么程序
- IE6下与的区别
- 介绍Dynamic特性(C#4.0)的好文章
- root用户删除文件提示:Operation not permitted
- 一位蜗牛程序员三年工作总结-2010