Welcome Guest, Not a member yet? Register   Sign In
Controller in for sub-directory
#1
Question 

Hello!

I try create controller in sub-directory, but get 404 error.
I just follow documentation https://codeigniter4.github.io/CodeIgnit...irectories and create folder "one" and file in folder "Hello.php":

PHP Code:
<?php namespace App\Controllers;

class 
Hello extends BaseController
{

    public function method()
    {
        echo 'success';
    }



App/Controllers/one/hello/method

Codeigniter has been installed in sub-directory site.com/backend
Now i try call controller by link site.com/backend/one/hello/method and i get 404 error - "Controller or its method is not found: App\Controllers\One::hello".

How to create controller files correctly in sub-diectory?

Thank you!
Reply


Messages In This Thread
Controller in for sub-directory - by mintwint - 09-07-2019, 05:38 AM
RE: Controller in for sub-directory - by ciadmin - 09-07-2019, 05:50 AM
RE: Controller in for sub-directory - by mintwint - 09-07-2019, 10:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB