我想設置我的,這樣的網址像word/startswith?prefix=ab
地圖路線,下面的代碼地圖查詢字符串控制器方法參數的Kohana 3.2
class Controller_Word extends Controller_Mytemplate {
public function action_startswith($fragment){
/// Here $fragment should get "ab" value.
}
}
而且任何人都可以告訴我,我怎樣才能得到的Kohana 3.2控制器數據?針對以上情況我可以解決這個問題,
class Controller_Word extends Controller_Mytemplate {
public function action_startswith($fragment=null){
if($fragment==null){
/// set $fragment to $_GET['prefix'] but in Kohana way.
}
}
}
沒有答案!甚至評論! :( – 2012-01-04 22:35:51