Welcome Guest, Not a member yet? Register   Sign In
I want to define variable in CodeIgnitor so that it can be accessed in application
#6

[eluser]Musaddiq Khan[/eluser]
I have created a file in application/config/user_constants.php and this file is auto loaded.
Code:
$config = array(
                'user_type' => array(CONST_ADMIN=> 1,CONST_MEMBER=> 2),
  'commission' => array(COMMISSION_HALF=>1,COMMISSION_FULL=>2)                        
               );
I get the commission type by coding below.
Code:
$commission = $this->config->item('commission');
It works fine.

Is it possible to us $commission without manually loading this config item.

Thanks


Messages In This Thread
I want to define variable in CodeIgnitor so that it can be accessed in application - by El Forum - 05-05-2012, 12:49 AM



Theme © iAndrew 2016 - Forum software by © MyBB