Confusion with MVC in CI - 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: Confusion with MVC in CI (/showthread.php?tid=31363) Pages:
1
2
|
Confusion with MVC in CI - El Forum - 06-16-2010 [eluser]mddd[/eluser] You can't name a controller function 'view' if you are using PHP4. Check the manual page on reserved names. Confusion with MVC in CI - El Forum - 06-16-2010 [eluser]ChaosKnight[/eluser] Thanks, I missed that part Confusion with MVC in CI - El Forum - 06-16-2010 [eluser]ChaosKnight[/eluser] It still happened after I changed the function to display()... And I still couldn't figure out why the database result threw away the country element of the array... Can someone see why? Edit: fixed the function part, now it's only the database object... Confusion with MVC in CI - El Forum - 06-16-2010 [eluser]ChaosKnight[/eluser] Solved Confusion with MVC in CI - El Forum - 06-16-2010 [eluser]evstevemd[/eluser] How did you solve it? Confusion with MVC in CI - El Forum - 06-16-2010 [eluser]ChaosKnight[/eluser] Changed my code to this... Model: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Controller: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); Don't know how efficient it is, there may be better suggestions, but it got the page working for me :-) The view is basic: Code: <?php if ( ! defined('BASEPATH')) exit('No direct script access allowed'); ?> |