CodeIgniter Forums

Full Version: Calling functions inside library
You're currently viewing a stripped down version of our content. View the full version with proper formatting.

El Forum

[eluser]Unknown[/eluser]
I have a library looking like this

class Anylibrary {
private $CI;

public function __construct()
{

$this->CI =& get_instance();


}

public function test()
{

echo $this->CI->hello();

}

public function hello() {

return "hello world";
}

}


I am not able to call function Hello from inside function test. Any ideas why?