Welcome Guest, Not a member yet? Register   Sign In
Newbie question
#1
Question 

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/tutor...ction.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
Reply
#2

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.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#3

@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?
Reply
#4

(10-16-2019, 08:29 AM)php_rocs Wrote: @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?

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
Reply
#5

@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
Reply
#6

@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/gener...ile-naming .
Reply
#7
Thumbs Up 

(10-18-2019, 07:05 AM)php_rocs Wrote: @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/gener...ile-naming .

Ok, that makes sense, thank you for the link!!!

Now I continue learning CI :-)
Thank you folks,
Marco
Reply




Theme © iAndrew 2016 - Forum software by © MyBB