Php 如何使用kohana 3.3 Route::url获取url以斜杠结尾/&引用;?
路线设置:Php 如何使用kohana 3.3 Route::url获取url以斜杠结尾/&引用;?,php,kohana,kohana-3,kohana-3.3,Php,Kohana,Kohana 3,Kohana 3.3,路线设置: Route::set('movie', '<id>(/<action>.htm)', array('id' => '[1-9][0-9]*') )->defaults( array('controller' => 'Movie', 'action' => 'index') ); 然后,得到一个url,如: http://www.domain.com/2 如何获得以“/”结尾的url 像这样: http://www.
Route::set('movie', '<id>(/<action>.htm)',
array('id' => '[1-9][0-9]*')
)->defaults(
array('controller' => 'Movie', 'action' => 'index')
);
然后,得到一个url,如:
http://www.domain.com/2
如何获得以“/”结尾的url
像这样:
http://www.domain.com/2/
谢谢
$url=Route::url('movie',array('id'=>2))。“/”
或将路由更改为'/(.htm)
http://www.domain.com/2/