Dynamic Config File - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: External Resources (https://forum.codeigniter.com/forumdisplay.php?fid=7) +--- Forum: Addins (https://forum.codeigniter.com/forumdisplay.php?fid=13) +--- Thread: Dynamic Config File (/showthread.php?tid=1490) |
Dynamic Config File - wolfgang1983 - 03-14-2015 I have just been working on a config file called config_setting.php I wanted to get my library file loaded in to it and found it hard. So I thought how about doing dynamic setup. And now I have got it working. If on your database table you had column called item_name and next to that column called item_value Just like in user guide Code: $this->config->set_item('item_name', 'item_value'); And then I could make code below. config/yourname.php make sure you autoload it. PHP Code: <?php It all works fine you should be able now to get item just by $this->config->item('item_value'); "Note: item_value just sample name" like in user guide. |