Hi Just installed CI, added a controller, see 404 |
Hi Guys,
I'm pretty new to CI. Really thanks that we have this forum. I just installed this version: codeigniter4-framework-v4.4.7-0-ge6a2f70 I use Apache to host web service. Following instructions, changed AllowOverride to All in Apache configuration. Changed web document root to "public" folder. With "localhost" I can call out IG welcoming page. But as I added an Act "editor": PHP Code: namespace App\Controllers; http://localhost/editor or http://localhost/Home/editor or http://localhost/index.php/Home/editor I only see: 404 Sorry! Cannot seem to find the page you were looking for. I also tried to add another controller: PHP Code: namespace App\Controllers; I call it with: http://localhost/Editor or http://localhost/index.php/Editor I again, see: 404 Sorry! Cannot seem to find the page you were looking for. I don't read ".htaccess" fluently, anything I can do? Thank you!
If you are new to CodeIgniter4, try this tutorial:
https://codeigniter4.github.io/CodeIgnit...index.html By default, you need to write routes for the controller method. See https://codeigniter4.github.io/CodeIgnit...ting-rules (04-01-2024, 09:41 PM)kenjis Wrote: If you are new to CodeIgniter4, try this tutorial: Thank you for the information. I add a new router: $routes->get('/Editor', 'Editor::index'); Then I see the new controller! |
Welcome Guest, Not a member yet? Register Sign In |