Welcome Guest, Not a member yet? Register   Sign In
Hi Just installed CI, added a controller, see 404
#1

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;

class 
Home extends BaseController
{
    public function index(): string
    
{
 
        return view('main');
    }
 
 public function 
editor()
    {
        echo "check";
        //return view('editor');
    }

I call it with:
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;

class 
Editor extends BaseController
{
    public function index(): string
    
{
        return view('welcome_message');
    }


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!
Reply


Messages In This Thread
Hi Just installed CI, added a controller, see 404 - by cndv3996 - 04-01-2024, 08:26 PM



Theme © iAndrew 2016 - Forum software by © MyBB