使用 uri 段获取价值
To get value using uri segment
在这里,我们使用 uri 段从 url 获取值。
http://localhost/project/ABC/activity/wise_activity
在这里,如果我想要wise_activity
,我可以用户
$this->uri->segment(2).
但是如果我想得到下面url的7
,我怎样才能得到?
http://localhost/project/ABC/activity/wise_activity?id=7
在Active record as
中使用get方法可以得到7
$id=$this->input->get("id");
echo $id;
在这里,我们使用 uri 段从 url 获取值。
http://localhost/project/ABC/activity/wise_activity
在这里,如果我想要wise_activity
,我可以用户
$this->uri->segment(2).
但是如果我想得到下面url的7
,我怎样才能得到?
http://localhost/project/ABC/activity/wise_activity?id=7
在Active record as
中使用get方法可以得到7 $id=$this->input->get("id");
echo $id;