【问题标题】:How to add route like example.com/module/controller/function/params in kohana如何在 kohana 中添加类似 example.com/module/controller/function/params 的路由
【发布时间】:2012-09-09 20:29:18
【问题描述】:

例如:

/modules/test/controllers/index.php - 文件夹结构

example.com/test/index/param1/someValue - 网址

或类似的东西。

我需要在引导程序中写什么来创建这条路径?

Route::set('test', 'test')
  ->defaults(array(
      'directory'  => 'modules/test/controllers',
      'controller' => 'index',
      'action'     => 'index',
  ));

但这不起作用。

【问题讨论】:

    标签: php module kohana


    【解决方案1】:

    我发现 Kohana 路由文档有点欠缺,并写了一个非常详细的概述来回答您的问题:http://www.kineticklink.com/kohana-3-routing/

    注意:我从来没有接触过更高级的正则表达式匹配的东西——将成为第 3 部分

    【讨论】:

    • 所以从我读到的,看起来我需要命名我的类 Controller_Modules_Test_Index - ??
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-09-08
    • 2023-02-03
    • 2011-10-26
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多