分页问题
$config['uri_segment'] = 3;分页方法自动测定你 URI 的哪个部分包含页数。如果你需要一些不一样的,你可以明确指定它。各位大虾,怎样详细指定啊?
function aaa( $c, $p ){
}
比如这个函数,我要那个 $p 为页数,要怎么做呢?$config['base_url']这个又怎么写? 没看明白。P为页数。C又为什么呢? C是另一个参数,和分页无关的 本帖最后由 yuwen002 于 2009-4-11 18:22 编辑
那你的url
http://localhost/index.php/aaa/c/p
$c = $this->uri->segment('2');
$p = $this->uri->segment('3');
具体看一下uri类吧
http://codeigniter.org.cn/user_guide/libraries/uri.html $config['uri_segment'] 这个是指定哪个 URL 段表示当前页数,这个东西不需要你处理,分页类自动处理。
index.php/第一段/第二段/第三段/..../第N段
明白了吧?
页:
[1]