Controller in for sub-directory |
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; 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!
Your Hello controller needs the proper namespace ...
Code: <?php namespace App\Controllers\one; |
Welcome Guest, Not a member yet? Register Sign In |