• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get a database value to the config file?

#1
[eluser]geshan[/eluser]
I need a system with changeable themes, so I need to get the active/current theme from the database to the config file from where I can access it in helpers and controllers. How do I do it???

#2
[eluser]@li[/eluser]
http://ellislab.com/codeigniter/user-gui...onfig.html
Quote:Setting a Config Item
If you would like to dynamically set a config item or change an existing one, you can so using:

Code:
$this->config->set_item('item_name', 'item_value');
Where item_name is the $config array index you want to change, and item_value is its value.

#3
[eluser]geshan[/eluser]
will it be accessible to multiple controllers/modules in HMVC?


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.