![]() |
Newbie question - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: Newbie question (/showthread.php?tid=74616) |
Newbie question - MarcoElias - 10-15-2019 Hi together, I am new to codeigniter, but not new to php. So I installed it, tried the first example from the tutorial, and it worked. Now I walked through the second tutorial (that one with the news) https://codeigniter.com/user_guide/tutorial/news_section.html and at the end it says: "Point your browser to your document root, followed by index.php/news and watch your news page." But then I get a 404 error (produced by codeigniter). Of course I controlled all files in the tutorial, but dont find the error. How can I find out, where I made a mistake in the tuturial? Is there somethink like a debug-modus? Thanks in advance! Marco RE: Newbie question - InsiteFX - 10-16-2019 Make sure your routes are correct and also the tutorial is missing the Success view you need to create that yourself in the views folder. RE: Newbie question - php_rocs - 10-16-2019 @MarcoElias, Have you followed the instructions to the T? Have you checked the error logs? Don't forget that PHP is case sensitive. Is your controller named correctly? RE: Newbie question - MarcoElias - 10-17-2019 (10-16-2019, 08:29 AM)php_rocs Wrote: @MarcoElias, Indeed, case sensitivity was my solution: I was supposed to create "/application/controllers/News.php", but I created "/application/controllers/news.php". Not very funny for a beginner to name SOME files with a beginning upper case and some other lower case. I also was supposed to create "/application/views/pages/home.php" (not Home.php) and "/application/views/pages/about.php" (not About.php). Confusing and frustrating for me. Plus, I would say, not consequently lowercase. Why some files upper and other lower? Another question: If in my environment I want to change every file to be lowercase at the beginning - where will that be done? Does this make sense? Thanks for helping, thanks for another tip. Marco RE: Newbie question - John_Betong - 10-17-2019 @MarcoElias, > Confusing and frustrating for me. Plus, I would say, not consequently lowercase. Why some files upper and other lower? With static pages, after the URL is $routed to the controller, I personally prefer to prefix the required view page with v-URL.php because the editor file names are easily distinguished from propercase Controller file names. ...my two Satang RE: Newbie question - php_rocs - 10-18-2019 @MarcoElias, Unfortunately you will not be able to change the naming of the files in CI because it is part of the PHP Style Guide: https://codeigniter.com/user_guide/general/styleguide.html#file-naming . RE: Newbie question - MarcoElias - 10-20-2019 (10-18-2019, 07:05 AM)php_rocs Wrote: @MarcoElias, Ok, that makes sense, thank you for the link!!! Now I continue learning CI :-) Thank you folks, Marco |