CodeIgniter Forums

Full Version: 404 - File Not Found Controller or its method is not found: \App\Controllers\Home::
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello, I'm still new with Codeigniter 4 here.



I tried to load my localhost on browser but it give me this error below (image attached)













404 - File Not Found

Controller or its method is not found: \App\Controllers\Home::index












can anyone please help me on why is this happening?
You should check if in App\Controllers there is the file Home.php, exactly like this, starting with a capital letter.
This refers to Controller in the error message.

If the file exists, in its content there must be a definition of the method, as below:
class Home extends BaseController. (the first run is how it looks)
Home, is the method referred to in the error message.

I am curious to know how you installed the framework: unzipping the file, e.g., framework 4.0.4.zip or via composer. In both ways, if the server settings are correct, the image sent by you looks like they are, the home page is displayed without problems, unless, of course, you have altered something.
Hi @damia,

Have you been able to resolve the issue?

Perhaps you could check out this link to give you an insight on 404 errors in CI.

Cheers
(11-25-2020, 04:31 AM)wdeda Wrote: [ -> ]You should check if in App\Controllers there is the file Home.php, exactly like this, starting with a capital letter.
This refers to Controller in the error message.

If the file exists, in its content there must be a definition of the method, as below:
class Home extends BaseController. (the first run is how it looks)
Home, is the method referred to in the error message.

I am curious to know how you installed the framework: unzipping the file, e.g., framework 4.0.4.zip or via composer. In both ways, if the server settings are correct, the image sent by you looks like they are, the home page is displayed without problems, unless, of course, you have altered something.
 Thank you so much!
(11-25-2020, 09:43 AM)sammyskills Wrote: [ -> ]Hi @damia,

Have you been able to resolve the issue?

Perhaps you could check out this link to give you an insight on 404 errors in CI.

Cheers
Thank you so much!