Welcome Guest, Not a member yet? Register   Sign In
Can't call a function in view file
#1

[eluser]Isos[/eluser]
Hello .. I am receiving a fatal error and I understand that there is something to be done to avoid it, it's when I created a function inside the file's class in controller called __get_time_difference() and called it only inside the view file:

Fatal error: Call to undefined method CI_Loader::__get_time_difference() in /Natalisushka/srv/www/UnderConstruction/client-core.com/kernel/application/views/CustomWritings/orders_view.php

How can I define method CI_Loader::__get_time_difference() ?

Thanks
#2

[eluser]Grahack[/eluser]
You'd better move this function to a helper, that's what they are here for! See the docs about helpers.
#3

[eluser]Isos[/eluser]
I thought about that, anyway, thanks for the tip.




Theme © iAndrew 2016 - Forum software by © MyBB