【问题标题】:PHP error on deploying to heroku部署到heroku时出现PHP错误
【发布时间】:2014-11-09 23:19:08
【问题描述】:

我是在 Heroku 上部署 PHP 应用程序的新手。我的应用程序在本地运行良好,但在 heroku 上它给出了图像中显示的错误。它是用 CodeIgniter 框架编写的。

【问题讨论】:

    标签: php codeigniter heroku


    【解决方案1】:

    在您的system/core/Common.php 中,将第 257 行修改为 -

    $_config[0] =& $config;
    return $_config[0];
    

    进一步阅读 - https://ellislab.com/forums/viewthread/244510/#1066393

    【讨论】:

      【解决方案2】:

      请在 index.php 中检查您的设置或将这段代码放在那里。

      define('ENVIRONMENT', 'development');  
      
      error_reporting(0);
      if (defined('ENVIRONMENT'))
      {
              switch (ENVIRONMENT)
              {
                  case 'development':
                      //error_reporting(E_ALL);
                  break;
      
                  case 'testing':
                  case 'production':
                      //error_reporting(0);
                  break;
      
                  default:
                      exit('The application environment is not set correctly.');
              }
        }
      

      【讨论】:

      • 你能检查一下这行“error_reporting(0);”
      • 你能检查我的代码吗,你能告诉我如何与heroku集成吗? Here 是链接。
      猜你喜欢
      • 1970-01-01
      • 2017-12-18
      • 1970-01-01
      • 2019-06-12
      • 2020-09-22
      • 2021-10-29
      • 1970-01-01
      • 1970-01-01
      • 2020-09-28
      相关资源
      最近更新 更多