title: Loading custom config file into a Codeigniter library
body: <p>I know this is probably simple, but I'm not getting. I've created a library, and I want to load the parameters from a config file. So here's an example of what I have:</p>
  
  <pre><code>// libraries/Mylib.php
  class Mylib {
     var $ci;
     var $key;
     public function _construct {
       $this-&gt;ci =&amp; get_instance();
       $this-&gt;ci-&gt;config-&gt;load('mylib');
       $this-&gt;key = $this-&gt;ci-&gt;config-&gt;item('key');
     }
     public function myKey() {
       return "Key=" . $this-&gt;key;
     }
  }
  
  // config/mylib.php
  $config['key'] = 'randomcharacters';
  </code></pre>
  
  <p>I load the library, and try to print out the myKey function, but it just returns "Key=", without the actual key. What am I missing?</p>