[eluser]matula[/eluser]
Here's an example of the code I have so far:
Code:
// libraries/Mylib.php
class Mylib {
var $ci;
var $key;
public function _construct {
$this->ci =& get_instance();
$this->ci->config->load('mylib');
$this->key = $this->ci->config->item('key');
}
public fucntion myKey() {
return "Key=" . $this->key;
}
}
// config/mylib.php
$config['key'] = 'randomcharacters';
But when I try to print out the myKey function, it just says "Key=" without the actual key. I checked the docs, and I'm sure I'm just missing something.
Thanks!