Welcome Guest, Not a member yet? Register   Sign In
Strange behaviour with custom library, my mistake?
#1

[eluser]CARP[/eluser]
Hi

I'm working with latest CI, and creating a custom library
I load my library from a view, as:

Code:
$this->load->library("mymsg");
echo $this->mymsg->myFunction();

I get:

Quote:Call to a member function myFunction() on a non-object

But: If I autoload my custom library (add to config/autoload.php)... IT WORKS!

What's the mistake here?

PS: I also tried this, from the same view, without luck

Code:
$CI =& get_instance();
$CI->load->library('mymsg');


Messages In This Thread
Strange behaviour with custom library, my mistake? - by El Forum - 04-24-2012, 02:49 PM
Strange behaviour with custom library, my mistake? - by El Forum - 04-24-2012, 03:45 PM
Strange behaviour with custom library, my mistake? - by El Forum - 04-24-2012, 03:56 PM
Strange behaviour with custom library, my mistake? - by El Forum - 04-24-2012, 04:01 PM
Strange behaviour with custom library, my mistake? - by El Forum - 04-24-2012, 11:25 PM



Theme © iAndrew 2016 - Forum software by © MyBB