用户
 找回密码
 入住 CI 中国社区
搜索
查看: 2750|回复: 3
收起左侧

[已解决] 关于routes.php的问题

[复制链接]
发表于 2010-2-8 21:58:49 | 显示全部楼层 |阅读模式
我在routes.php文件中加了$route['shop-(:num)'] = "home/shop/$1";使http://localhost/ci/shop-35映射到http://localhost/ci/home/shop/35,用$this->uri->segment(3)取不到35,怎样才能取到啊?
发表于 2010-2-9 01:39:24 | 显示全部楼层
改用 $this->uri->rsegment(3);

仔细参考 http://codeigniter.org.cn/user_guide/libraries/uri.html
 楼主| 发表于 2010-2-9 16:58:23 | 显示全部楼层
回复 2# Hex
恩 解决了 谢谢啦
 楼主| 发表于 2010-2-9 17:03:29 | 显示全部楼层
ci太牛啦!!!

本版积分规则