;项目配置信息;项目配置信息到配置方法. 以 Apache 服务器模式为例:;可以在 httpd.conf 虚拟主机配置段或者项目 .htaccss文件里定义.;具体定义方法是添加一行指令: SetEnv APPLICATION_ENV 产品运行环境;比如开发环境: SetEnv APPLICATION_ENV development;在使用上一篇文章中用到的方法新建项目时自动生成的.htacess文件内容如下;SetEnv APPLICATION_ENV development;RewriteEngine On;RewriteCond %{REQUEST_FILENAME} -s [OR];RewriteCond %{REQUEST_FILENAME} -l [OR];RewriteCond %{REQUEST_FILENAME} -d;RewriteRule ^.*$ – [NC,L];RewriteRule ^.*$ index.php [NC,L];关于产品运行环境,application.ini中定义了三种 staging testing development 即 上线状态 测试状态 开发状态[production];phpsettings php中运行时环境的配置,实际上调用的是php的ini_set() 函数phpSettings.display_startup_errors = 0phpSettings.display_errors = 0phpSettings.log_errors = 1phpSettings.log_errors_max_len = 1024phpSettings.ignore_repeated_errors = 1phpSettings.date.timezone = “Asia/Shanghai”phpSettings.error_log = APPLICATION_PATH “/../lib/error/error.log”;bootstrap 引导文件配置bootstrap.path = APPLICATION_PATH “/Bootstrap.php”;bootstrap.class = “Bootstrap” 此项可省略,应为默认的是Bootstrap;autoloadernamespaces 注册自动载入的命名空间autoloadernamespaces.0 = “DB_”autoloadernamespaces.1 = “Help_”;前端控制器配置resources.frontController.params.displayExceptions = 0resources.frontController.moduleDirectory = APPLICATION_PATH “/modules”resources.frontController.moduleControllerDirectoryName = “controllers”resources.frontController.defaultModule = “default”;布局配置resources.layout.layout = “default”resources.layout.layoutPath = APPLICATION_PATH “/layouts/default”;视图部分配置, 依据模块分开配置 (这部分要在Bootstrap中初始化)resources.view.params.default.basePath = APPLICATION_PATH “/modules/default/views/”resources.view.params.default.layout = “default”resources.view.params.default.layoutPath = APPLICATION_PATH “/layouts/default”resources.view.params.admin.basePath = APPLICATION_PATH “/modules/admin/views/”resources.view.params.admin.layout = “admin”resources.view.params.admin.layoutPath = APPLICATION_PATH “/layouts/admin”;数据库配置(这部分要在Bootstrap中初始数据库配置)resources.db.adapter = “mysqli”resources.db.params.host = “localhost”resources.db.params.username = “root”resources.db.params.password = “123456″resources.db.params.dbname = “dxk”resources.db.params.charset = “utf8″;网站上线环境配置[staging : production]phpSettings.display_startup_errors = 0phpSettings.display_errors = 0;测试环境配置[testing : production]phpSettings.display_startup_errors = 1phpSettings.display_errors = 1;开发环境配置[development : production]phpSettings.display_startup_errors = 1phpSettings.display_errors = 1resources.frontController.params.displayExceptions = 1
详细解决方案
php之ZendFramewor篇(1)application.ini配置说明
热度:20 发布时间:2016-04-29 00:15:44.0
相关解决方案
- 采取spring mvc和hibernate开发,application.xml的配置求详细分析
- Parse error in application web.xml,该如何解决
- JSP文件开头声明了是一个上载文件(contentType="application/x-download"),是不是就不能在上面执行javascript和html了
- 急问:S60,eclipse,打开模拟器总是提示“unhandled exception.Close application?该如何解决
- java.lang.SecurityException: Application not
- NEC N820 Application Emulator 装上后,不有编译解决思路
- java.lang.SecurityException: Application not authorized to access the restricted API有关问题,
- Your project contains error(s), please fix them beforerunning your application.该怎么解决
- 为什么虚拟串口安装了不能用 显示“Unable loading system driver ,the application will be eixt.”解决办法
- netbeans desktop Application 连 Oracle 数据库的有关问题
- IntelliJ Idea 11 中编写 JavaSE Application 怎么获得用户的键盘输入
- run as java application 与 tomcat解决办法
- Server Error in '/' Application.解决方法
- 用数据库,application,数组分别实现的算法哪个比较好呢?解决方法
- C#操作word出现“The message filter indicated that the application is busy”,该怎么解决
- Server Error in '/' Application.该怎么处理
- 各位大侠 哪位高手指点迷津 一上啊 Server Error in '/' Application
- 报错劳驾高手帮忙看看Server Error in '/' Application
- ASP的7个对象Session、Application、Cookie、Response、Request、Server不知是什么意思,经常混,如何用,多谢
- 网站每隔20多天,在早下会出现Server Application Unavailable
- Server Application Error 如何解决
- 关于微软的Web Application Stress Tool的有关问题
- Server Error in '/' Application.求帮助解决办法
- Application 变量丢失是什么情况?解决思路
- 页面打开很长时间后,Application cache被清空解决办法
- HttpContext.Current.Application["arg"]跨页面有关问题
- Application/Session/ViewState/Cache/cookie 这几个对象可以存储的最大长度是多少,默认是多少?解决方案
- IIS Web Application Pool的管理。该怎么处理
- 如何用excel.application.workbooks.open读取EXCEL模板
- ftp上传的网站浏览异常Server Error in '/' Application