【问题标题】:Codeigniter CIBonfire how to change mode from development to production?Codeigniter CIBonfire 如何将模式从开发更改为生产?
【发布时间】:2013-06-10 01:13:19
【问题描述】:

我正在使用 CIBonfire 创建我的第一个应用程序,我已准备好将其推送到生产环境,但我不确定如何将模式从开发更改为生产,以便它不会显示分析器中的内容页脚。

我无法在任何设置菜单或文档中找到它。任何帮助表示赞赏。

【问题讨论】:

  • 有点奇怪但是,$this->output->enable_profiler(FALSE);?
  • 我认为它在index.php 文件中
  • ye, define('ENVIRONMENT', 'production'); in index.php

标签: php codeigniter codeigniter-2 bonfire


【解决方案1】:

在 CI-Bonfire 的 index.php 文件中。你可以在这里找到这个位置,只需将define('ENVIRONMENT', 'development') 更改为define('ENVIRONMENT', 'production')

 * You can load different configurations depending on your
 * current environment. Setting the environment also influences
 * things like logging and error reporting.
 *
 * This can be set to anything, but default usage is:
 *
 *     development
 *     testing
 *     production
 *
 * NOTE: If you change these, also change the error_reporting() code below
 *
 */
    define('ENVIRONMENT', 'production');

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2015-11-30
    • 2019-09-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多