php - Kohana : Kohana_HTTP_Exception [ 404 ]: The requested URL calendar was not found on this server -


i'm learning kohana , i'm using ver:3.3.0.

i'm getting error:

kohana_http_exception [ 404 ]: requested url calendar not found on server. syspath\classes\kohana\request\client\internal.php [ 79 ]  syspath\classes\kohana\request\client\internal.php [ 79 ] syspath\classes\kohana\request\client.php [ 114 ] » kohana_request_client_internal->execute_request(arguments) syspath\classes\kohana\request.php [ 990 ] » kohana_request_client->execute(arguments) docroot\index.php [ 118 ] » kohana_request->execute()  

url type in:

(//localhost/organizer_tst/calendar/) 

my files:

application\classes\controller\calendars\calendar.php:

class controller_calendar extends controller {      public function action_index()     {         $tst = new model_calendar();                echo $tst->testing("lollolooll");                   } } 

application\classes\model\calendar.php:

class model_calendar extends model {     public function testing($param)     {         $tst ="i want display it: "."$param";         return $tst ;             }    } 

bootstrap.php:

kohana::init(array(     'base_url'   => '/organizer_tst/', ));  route::set('something', 'calendar(/<directory>(/<controller>(/<action>(/<id>))))')     ->defaults(array(         'directory'  => 'calendars',         'controller' => 'calendar',         'action'     => 'index',     ));  route::set('default', '(<controller>(/<action>(/<id>)))')     ->defaults(array(         'controller' => 'welcome',         'action'     => 'index',     )); 

i checked "environment->included files" on error page can see controller file: apppath\classes\controller\calendars\calendar.php

everything working if controller not in directory in case : application\classes\controller\calendars\calendar.php

i use xampp root directory: d:\xampp\htdocs , have alias project: alias /organizer_tst/calendar "d:\xampp\htdocs\organizer_tst"

can please tell me why have error exception?

kohana's naming conventions tell how should name , locate classes.

in case kohana looking class named controller_calendars_calendar in location application/classes/controller/calendars/calendar.php. finds file not class. should name class controller_calendars_calendar or move file application/classes/controller/calendar.php


Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -