Welcome Guest, Not a member yet? Register   Sign In
Controllers under subfolder
#1

Hi,

I have a controller under a sub-folder (Controllers\ajax\Test.php) but when I try to access from the browser (/ajax/test/testmethod) I get an error message "Controller or its method is not found."

Please note if I do a class map in Config\Autoload.php like this:

 $classmap = [
      "Test" =>  APPPATH . "Controllers/ajax/Test.php"
 ];

then it works.  However, If I namespace my controller (namespace Ajax) then the controllers does not get loaded and get the same error message.

Is there any workaround or should I do it in another way.

Thanks in advance and best regards,
Fabian
Reply


Messages In This Thread
Controllers under subfolder - by fromberg - 06-30-2016, 10:40 PM
RE: Controllers under subfolder - by sv3tli0 - 06-30-2016, 11:53 PM
RE: Controllers under subfolder - by InsiteFX - 07-01-2016, 04:08 AM
RE: Controllers under subfolder - by titounnes - 07-01-2016, 01:20 PM
RE: Controllers under subfolder - by arma7x - 07-01-2016, 02:12 PM
RE: Controllers under subfolder - by titounnes - 07-01-2016, 09:20 PM
RE: Controllers under subfolder - by arma7x - 07-02-2016, 12:23 AM
RE: Controllers under subfolder - by fromberg - 07-01-2016, 10:07 PM
RE: Controllers under subfolder - by arma7x - 07-02-2016, 02:06 AM
RE: Controllers under subfolder - by fromberg - 07-02-2016, 07:24 AM
RE: Controllers under subfolder - by arma7x - 07-02-2016, 07:52 AM
RE: Controllers under subfolder - by sv3tli0 - 07-02-2016, 01:02 AM
RE: Controllers under subfolder - by titounnes - 07-02-2016, 03:40 AM
RE: Controllers under subfolder - by arma7x - 07-02-2016, 04:27 AM
RE: Controllers under subfolder - by arma7x - 07-02-2016, 04:05 AM
RE: Controllers under subfolder - by titounnes - 09-26-2019, 03:46 AM
RE: Controllers under subfolder - by InsiteFX - 07-02-2016, 03:19 AM
RE: Controllers under subfolder - by kilishan - 07-05-2016, 08:42 PM
RE: Controllers under subfolder - by InsiteFX - 07-10-2016, 04:59 AM
RE: Controllers under subfolder - by arma7x - 07-10-2016, 06:33 AM
RE: Controllers under subfolder - by InsiteFX - 07-10-2016, 07:00 AM
RE: Controllers under subfolder - by arma7x - 07-10-2016, 07:17 AM
RE: Controllers under subfolder - by InsiteFX - 07-10-2016, 01:01 PM
RE: Controllers under subfolder - by mwhitney - 07-27-2016, 09:23 AM
RE: Controllers under subfolder - by InsiteFX - 09-26-2019, 03:42 AM
RE: Controllers under subfolder - by InsiteFX - 09-26-2019, 04:37 AM
RE: Controllers under subfolder - by InsiteFX - 09-26-2019, 12:40 PM
RE: Controllers under subfolder - by InsiteFX - 09-26-2019, 07:12 PM



Theme © iAndrew 2016 - Forum software by © MyBB