Welcome Guest, Not a member yet? Register   Sign In
Saving data from DB to a config file
#1

[eluser]the_unforgiven[/eluser]
Hi All,

I have setup a custom config file in application/config/web.php is the file name.

And in there I want to get a row from the database and place this or whatever is in the row at that time and save it the config file.

Code:
<?php
$config = array(
'site_title' => $this->wc_settings->get('site_title'),
);
?>
// This doesn't seem to work

I'm using wiredesignz modular system so everything is set up in a folder called modules, and I have a model in my folder like so:

application/modules/settings/models/wc_settings.php

So how would I call this to just show the site_title in the config file?

#2

[eluser]Harold Villacorte[/eluser]
Can't you just instantiate the super object in the config file and load the model that way?




Theme © iAndrew 2016 - Forum software by © MyBB