![]() |
Controller Problems - 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: Controller Problems (/showthread.php?tid=2961) |
Controller Problems - El Forum - 09-02-2007 [eluser]ColinL[/eluser] Hey all. New to CodeIgniter, and already running into problems. Just got done installing/configuring CI, and went ahead and started going through the video tutorials. But right off the bat, I've hit a snag. I've created the Blog controller shown in the first video tutorial, but when I go to my browser, instead of seeing "Hello World" I get a Page Cannot Be Found error. I'm running it locally, with IIS 5.1, MySQL 5 and PHP5. Anyone got anyideas what's causing the problem? Controller Problems - El Forum - 09-02-2007 [eluser]gunter[/eluser] has the file, the class and the constructor the same name? check out, if you can echo something in the constructor, or in the index function.... or, show us your controller :-) another idea is to copy the welcome controller and change it to your needs Controller Problems - El Forum - 09-02-2007 [eluser]ColinL[/eluser] Cheers for the reply. ![]() The file is called blog.php and the class is called Blog. The actual controller is as follows: Code: <?php Controller Problems - El Forum - 09-02-2007 [eluser]gunter[/eluser] uh, thats tricky... this should work!! if the file is at it´s right place I don´t know what´s wrong... :roll: if you call ...index.php/welcome - then you see the welcome controller/view, right? Controller Problems - El Forum - 09-02-2007 [eluser]ColinL[/eluser] Yeah, its stumped me. The file is the controllers folder, which I assume is the right place. Controller Problems - El Forum - 09-02-2007 [eluser]gunter[/eluser] so I cannot figure out why it´s not working - the constructor is not necessary if you don´t need a constructor I think... - don´t know... then, if the welcome controller is working then I would copy it to blog.php and change all welcome´s to blog... :coolsmirk: I really don´t know anything other to do now... Controller Problems - El Forum - 09-02-2007 [eluser]ColinL[/eluser] Hmm. This maybe of help. Just went to try the welcome controller in my browser, and the samething is happening. Getting a page cannot be found error. Controller Problems - El Forum - 09-04-2007 [eluser]gunter[/eluser] uh, sorry! Just now I saw that you are using IIS... please do this: http://ellislab.com/forums/viewreply/220662/ or search for postings with IIS and index.php problems ;-) you have to change the config.php to: Code: $config['index_page'] = "index.php?"; and I think you have to use: ..../index.php?/welcome to call the welcome controller. good luck!! Controller Problems - El Forum - 09-04-2007 [eluser]coolfactor[/eluser] Yes, my first thought was IIS was the problem. Hopefully the changes that gunter suggested will help. Controller Problems - El Forum - 09-04-2007 [eluser]ColinL[/eluser] Cool. Will give it a shot when I get home from work. Cheers guys. |