10-02-2007, 04:47 AM
[eluser]tomcode[/eluser]
Hi,
I used to call functions defined in the controller from within my views. Under PHP4 this works without any problems. Now I'm switching to PHP5 and I get:
in my Controller I've defined the function :
in the fragment view I call it with:
What to do ? I want to keep the function inside the controller (no helper or library loading)
Thanks, Thomas
Hi,
I used to call functions defined in the controller from within my views. Under PHP4 this works without any problems. Now I'm switching to PHP5 and I get:
Quote:Call to undefined method CI_Loader::insert_code()
in my Controller I've defined the function :
Code:
function insert_code()
{
return 'Hi';
}
in the fragment view I call it with:
Code:
<?=$this->insert_code();?>
What to do ? I want to keep the function inside the controller (no helper or library loading)
Thanks, Thomas