![]() |
Noob: Trouble using Models, Parse Errors & The like occur :( - 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: Noob: Trouble using Models, Parse Errors & The like occur :( (/showthread.php?tid=1698) |
Noob: Trouble using Models, Parse Errors & The like occur :( - El Forum - 06-20-2007 [eluser]Unknown[/eluser] I must start off by saying I\'m usually the type to just get really stubborn and figure it out on my own but this time I must admit I really need some help ![]() Okay so lets get into it. I decided to use CI to code my website because I wanted to create a lean, very simple content managing system. Right now I\'m trying to pull text out of a database and display it on a page. I keep getting PHP Parse errors however, having messed around with it and getting different error messages ![]() Here\'s what I have now: Parse error: syntax error, unexpected T_STATIC, expecting T_STRING in [...]/system/application/models/static.php on line 2 Here\'s the code for my Model (it exists in the models folder as static.php): Code: <?php I\'m guessing you\'ll need the controller and the View too so here goes: Controller (exists in controllers folder as home.php): Code: <?php home_page.php): Code: <html> Let me know if you\'ll want information about my Database too! Thanks so much in advance! I\'ll see if perhaps I can return the favor somehow. Thanks again, Sean" "Noob: Trouble using Models, Parse Errors & The like occur :(" - El Forum - 06-20-2007 [eluser]woopsicle[/eluser] static is a reserved word in PHP try changing your model name to something else. edit: FYI - http://au2.php.net/manual/en/reserved.php "Noob: Trouble using Models, Parse Errors & The like occur :(" - El Forum - 06-21-2007 [eluser]Unknown[/eluser] Ahh! Big thanks. It\'s always the simple stuff isn\'t it? Edit: Still having some errors but nothing I can\'t work out so my code isn\'t as it was when I posted anymore, I\'ve wrinkled out a lot of kinks. |