Welcome Guest, Not a member yet? Register   Sign In
Loading a library from within a model not working??
#1

[eluser]Mackstar[/eluser]
Hi I have a library with a class called Encoding,

the file is saved as Encoding.php

When I call the library from within a controller it is working propery.

But when I use it from inside a model it is giving me Call to undefined method stdClass::function_name() errors.

Why is this??, I am calling the function from $this->encoding-> function_name();

When I call $this->load->library('Encoding'); from the model, I have put test code in the Encoding class constructer and it works, so the class is being called but the model doesn't seem to go to to $this->encoding or $this->Encoding

I have tried get_class($this->encoding); and I get nothing. I run this from a controller and it works...?

Any help is appreciated...

Richard


Messages In This Thread
Loading a library from within a model not working?? - by El Forum - 04-02-2009, 08:19 PM
Loading a library from within a model not working?? - by El Forum - 04-02-2009, 08:32 PM
Loading a library from within a model not working?? - by El Forum - 04-03-2009, 03:04 AM



Theme © iAndrew 2016 - Forum software by © MyBB