Created
October 30, 2011 01:02
-
-
Save og-shawn-crigger/1325321 to your computer and use it in GitHub Desktop.
Start of reading/writing Config Options From Database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); | |
class MY_Config extends CI_Config { | |
public function database() | |
{ | |
if (function_exists('get_instance')) | |
{ | |
$CI =& get_instance(); | |
$query = $CI->db->get('config'); | |
foreach ($query->result() as $item) | |
{ | |
$this->set_item($item->name, $item->value); | |
} | |
} | |
} | |
} | |
/* End of file MY_Config.php */ | |
/* Location: ./application/core/MY_Config.php */ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment