First Time Using Models - 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: First Time Using Models (/showthread.php?tid=13954) |
First Time Using Models - El Forum - 12-12-2008 [eluser]Bl4cKWid0w[/eluser] I'm using models to create a wiki. I get a php syntax error saying that it can't redeclare class Wiki on line 59. Line 59 is empty. I already made sure that all my if statements, etc were closed. Here is my code: Code: <?php First Time Using Models - El Forum - 12-12-2008 [eluser]gstjohn[/eluser] Try capitalizing your constructor. Code: function Wiki(){ First Time Using Models - El Forum - 12-12-2008 [eluser]gstjohn[/eluser] Double post...sorry! Do you have a controller named 'Wiki'? That is likely causing the redeclaration. First Time Using Models - El Forum - 12-12-2008 [eluser]missionsix[/eluser] [quote author="gstjohn" date="1229144916"]Double post...sorry! Do you have a controller named 'Wiki'? That is likely causing the redeclaration.[/quote] it IS whats causing the problem. Hes just looking in the wrong place. Check your controller where you are loading the wiki model, that is where the class declaration collides. First Time Using Models - El Forum - 12-13-2008 [eluser]Bl4cKWid0w[/eluser] Yeah, that was it. Thanks. |