CodeIgniter Forums
A simple question .. - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: A simple question .. (/showthread.php?tid=2145)



A simple question .. - El Forum - 07-18-2007

[eluser]gops[/eluser]
When I use something like

echo form_open('email/send');

this in my CI code. How code igniter will find send function ?

1) Will it first search for a email controller and then send method ?

Or

2) Will it search for a email folder and within it , send controller ?

How can I change the behavior ?

Thanks.


A simple question .. - El Forum - 07-18-2007

[eluser]Glen Swinfield[/eluser]
It will load the 'email' class and call the 'send' method of that class. You can't change this functionality without re-writing the core of CI, but you can use routes.php to to alter what points where. Check the manual for Routes.


A simple question .. - El Forum - 07-19-2007

[eluser]Developer13[/eluser]
# 1 is the correct answer (class/method).

However, you can change this behavior by using _remap.