无法找到常量ONLINE [关闭]

am using CodeIgniter and i keep get a error from the config file

A PHP Error was encountered
Severity: Warning
Message: constant() [function.constant]: Couldn't find constant ONLINE
Filename: libraries/co.php
Line Number: 534


A PHP Error was encountered
Severity: Warning
Message: Cannot modify header information - headers already sent by (output started at /home/baahoot/public_html/Outlaws/system/core/Exceptions.php:185)
Filename: helpers/url_helper.php
Line Number: 542

i am not sure what i am doing wrong this is a working code from git hub. I am new to php and would like to see how this worked on arvixe server using the mysql db anyone know how to fix this type of error??

libraries/co.php somewhere around :534

function __construct() { 
    $CI =& get_instance(); 
    //$CI->form_validation->set_error_delimiters( '<br /><div class="response error-note">Error: ', '</div>' ); 
    if(constant('ONLINE') == FALSE): 
        //$CI->output->enable_profiler(TRUE); endif; 
    if(1 == 0 && constant('ONLINE') == TRUE ) { 
        echo $CI->load->view('temporary', '', true); exit; 
    } $CI->load->config('redis'); 
    $this->redis = ($CI->config->item('redis_active')); 
}

Just use project-wide case sensitive search on word ONLINE, any modern IDE and even editors have this functionality.

See where it's used and see if it's defined somewhere. If not - see what depends on it and define somewhere in the project. It's a constant, not a variable, so it's a simple value you hard-code in your project, so there should be no problem with getting to know what it should be.

You may even try setting it to true, but that's just a guess. For further help, please update your question with the code from the method at

Filename: libraries/co.php
Line Number: 534

EDIT:

after you provided the code, I recommend to just make a dirty hack and add these lines to the __construct method right in the beginning so it would look like this.

function __construct() {
    if(!defined('ONLINE')) {
        define('ONLINE', true);
    }

If it will throw errors, try false instead of true. As I understand, this constant if true means that the page is in production, and in development if false, so play around as you wish.

Consider cleaning up all the code.