문제

안녕하세요 Kohana 3 사용자 정의 경로와 일치하는 동안 문제가 있지만, 모든 것이 정확하지만 url은 경로와 일치하지 않습니다.다음은 my bootstrap.php 파일의 설정입니다.

   Kohana::init(array(
'base_url'   => '/basepath/',
    'index_file' => 'index.php'
  ));

  /**
  * Attach the file write to logging. Multiple writers are supported.
  */
  Kohana::$log->attach(new Log_File(APPPATH.'logs'));

  /**
  * Attach a file reader to config. Multiple readers are supported.
  */
   Kohana::$config->attach(new Config_File);

   /**
   * Enable modules. Modules are referenced by a relative or absolute path.
   */
   Kohana::modules(array(
'auth'       => MODPATH.'auth',       // Basic authentication
// 'cache'      => MODPATH.'cache',      // Caching with multiple backends
// 'codebench'  => MODPATH.'codebench',  // Benchmarking tool
'database'   => MODPATH.'database',   // Database access
'image'      => MODPATH.'image',      // Image manipulation
'orm'        => MODPATH.'orm',        // Object Relationship Mapping
// 'unittest'   => MODPATH.'unittest',   // Unit testing
'userguide'  => MODPATH.'userguide',  // User guide and API documentation
));


      /**
      * Set the routes. Each route must have a minimum of a name, a URI and a set of
      * defaults for the URI.
      */
    Route::set('default', '(<controller>(/<action>(/<id>)))')
->defaults(array(
    'controller' => 'welcome',
    'action'     => 'index',
));

    Route::set('category_images', 'cat/<category>', array('category'=>'[a-z\-_\.]+'))
->defaults(array(
    'controller' => 'categoryimages',
    'action'     => 'index',
));

     Route::set('user_images', '<username>/images(/<pageid>)', array('username'=>'[a-z\-_\.]+', 'pageid'=>'[1-9][0-9]*'))
->defaults(array(
    'controller' => 'userimages',
    'action'     => 'index',
));




     Route::set('dynamic_image', 'image/thumbnail/<size>/<id>/<image>', array('size'=>'s|m|z', 'id'=>'[0-9]+', 'image'=>'.+'))
->defaults(array(
    'controller' => 'image',
    'action' => 'thumbnail'
));
.

첨부 된 오류 메시지가 있습니다. 여기에 이미지 설명

여기에 문제가있는 경우 명명 규칙을 표시하는 대상 컨트롤러가 있습니다.

<?php

class Controller_Categoryimages extends Controller_Template {

    public $template = 'template';
public $images_per_page = 15;

// show images of a user
    public function action_index() {
       //code here
     }
.

URL과 일치하지 않는 이유가 있는지 알 수 있는지 알려주십시오.

사전에 감사드립니다.

도움이 되었습니까?

해결책

기본 경로는 모든 것을 잡을 때 마지막으로 지속되어야합니다.완전히 삭제하는 것이 좋습니다.현재 기본값 일치하고 있으며 Contoller_cat 클래스를 작업 하늘이있는 Contoller_cat 클래스를로드하려고합니다.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top