关于URI
本帖最后由 小竹子哥 于 2012-12-3 23:19 编辑http://localhost/CI/index.php/k/5
我们都知道用$this->uri->segment(2)获取5,但是http://localhost/CI/index.php/k/5显示的内容在哪写代码? 真心没懂你说的什么意思 仔细看CI手册上关于控制器一节:
http://codeigniter.org.cn/user_guide/general/controllers.html#passinguri
如果你没设置路由(config/routers.php)的话,任何一个URI都有如下约定:http://localhost/CI/index.php/controller/method/param1/param2controller就是控制器类名,method是你调用的方法,后面的片段就是这个方法的输入参数了。
页:
[1]