CodeIgniter Forums
Issue with undefined function - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: Issue with undefined function (/showthread.php?tid=71038)



Issue with undefined function - richb201 - 06-28-2018

I am having a problem calling a function. There seems to be two kinds of modules in my project. A) module that has functions that extend ci_model . These functions allow you to use this->. Typical CI stuff. B) module that is just straight php code. These functions don't extend the ci_model. 

I have a need to call a function in a A module from a B module. This won't work and I get an undefined function error when I run the call. What must I add to module B to tell it to look in Module A for the missing function?

I hope I explained this ok?


RE: Issue with undefined function - neuron - 06-28-2018

You can implement your B module as library, put it in application/folder and load it in your A model, that extends CI_model


RE: Issue with undefined function - richb201 - 06-29-2018

I think the original code was written to use php mail. Is there anything I need to do to enable php mail to work in my CI app?


RE: Issue with undefined function - neuron - 06-29-2018

CI has email library, you can check it documentation