【发布时间】:2012-01-04 22:13:01
【问题描述】:
我想设置我的路线,以便像word/startswith?prefix=ab 这样的网址映射到以下代码
class Controller_Word extends Controller_Mytemplate {
public function action_startswith($fragment){
/// Here $fragment should get "ab" value.
}
}
还有谁能告诉我如何在 Kohana 3.2 控制器中获取 GET 数据?对于上述情况,我可以解决它,
class Controller_Word extends Controller_Mytemplate {
public function action_startswith($fragment=null){
if($fragment==null){
/// set $fragment to $_GET['prefix'] but in Kohana way.
}
}
}
【问题讨论】:
-
没有答案!甚至是评论! :(
标签: php model-view-controller kohana kohana-3