how to specify instance in library |
[eluser]elmne[/eluser]
I have a function like this in the library Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed'); When i run the process, i get this error Quote:A PHP Error was encountered Line 11 is this Code: 9 $this->CI =& get_instance(); Therefore i seem to have a problem with the "get_instance" how am i supposed to specify it to work? The source for this is a login tutorial at www.bramme.net/2008/07/auth-library-for-codeigniter-tutorial/
[eluser]packetfox[/eluser]
I do it this way: Code: <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
[eluser]packetfox[/eluser]
Well yes, loading it first of course. I autoload most of my commonly used Libs, so its not needed;
|
Welcome Guest, Not a member yet? Register Sign In |