![]() |
how to include a file inside a model? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: how to include a file inside a model? (/showthread.php?tid=46982) |
how to include a file inside a model? - El Forum - 11-22-2011 [eluser]Unknown[/eluser] Hello guys, I'm new to codeigniter and maybe my question is a bit stupid but..I cant understand how I can include a file inside a model. Inside del model folder I've a subfolder named include and inside this I've some php file. The structure is something like that: -models --mymodel.php --include ---file.php ---file1.php Inside mymodel.php how I can include the file.php? I've heard that the relative path is allways the index.php, so I've tried: include 'models/include/file.php' but it seems not working. I've tried to use base_url() and site_url() without any luck.. Can anyone help me? |