php codeuri->segment(n)
它允许你重新分割一个详细的uri分段。 n 为你想要得到的段数。分割数按照从左至右的顺序编排。
------解决方案--------------------
楼主搞框架啊。我直接explode('/', $url);
------解决方案--------------------
$this->uri->segment(n)
ci是这个方法
ci是这样处理的:
explode(/, preg_replace(|/*(.+?)/*$|, \\1, $this->uri_string))
不过我会采用 explode 这个方式了。
