![]() |
404 Page Not Found - 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: 404 Page Not Found (/showthread.php?tid=34445) Pages:
1
2
|
404 Page Not Found - El Forum - 09-30-2010 [eluser]InsiteFX[/eluser] Did you change your application/config/routes.php file to point to your new default controller? InsiteFX 404 Page Not Found - El Forum - 09-30-2010 [eluser]ubuntuman[/eluser] @WanWizard - I am running windows 7 OS, Wamp server, read-write permission. How do I enable CI logging. @InsiteFX - Yes! I change the application/config/routes.php file to point to my new controller. still did not work. 404 Page Not Found - El Forum - 09-30-2010 [eluser]techgnome[/eluser] may sound like a stupid question, but I ask because I've done it myself... But when you renamed the .php controller file to a new name... you did remember to change the Class name inside the file to match, right? And, in addition, changed the name of the constructor function, too right? AND.... (and this is something I got snagged on too) ... you didn't use a reserved word by any chance did you? http://ellislab.com/codeigniter/user-guide/general/reserved_names.html -tg 404 Page Not Found - El Forum - 09-30-2010 [eluser]InsiteFX[/eluser] Post the code to your controller and use code tags! InsiteFX 404 Page Not Found - El Forum - 09-30-2010 [eluser]ubuntuman[/eluser] My Viewer "home_message.php" Code: <style type="text/css"> My Controller - homepg.php Code: <?php My routes.php Code: $route['default_controller'] = "homepg"; 404 Page Not Found - El Forum - 09-30-2010 [eluser]ubuntuman[/eluser] @TechGnome - I checked everything and its ok. 404 Page Not Found - El Forum - 09-30-2010 [eluser]ubuntuman[/eluser] Did anyone encounter this problem? I am just fed-up with this thing. 404 Page Not Found - El Forum - 09-30-2010 [eluser]ubuntuman[/eluser] Got it! I am so dumb! Really dumb! The route was set to the viewer and not the controller file. Thanks anyway guys. 404 Page Not Found - El Forum - 09-30-2010 [eluser]InsiteFX[/eluser] You are missing the constructor for 1 Also your controller is home.php not homepg.php The controller filename should be the name of the controller home.php Code: class Home extends Controller { Then change the default controller in routes.php to home. InsiteFX 404 Page Not Found - El Forum - 10-04-2010 [eluser]Unknown[/eluser] Hi, I've got pretty much exactly the same problem. The only way I get my code to work is to use welcome.php as a controller, nothing else works. It's sort of ok, through welcome.php I can use other view files, but I'd suppose there should be a way to also change the file name somehow... I've changed the "$route['default_controller']" in routes.php, which was the only file I found "welcome.php" being mentioned. Change this to any other controller file than "welcome.php" and I get 404... Welcome.php itself works just fine. If I change the "$this->load->view" to my own file it work ok. |