Dynamic Config File |
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.
There's only one rule - please don't tell anyone to go and read the manual. Sometimes the manual just SUCKS!
|
Welcome Guest, Not a member yet? Register Sign In |