phpers 发表于 2010-6-10 10:00:02

在线等 Linux 下分页出错

phpinfo地址:
http://www.lhilmonclub.com/phpinfo.php


分页地址:
http://www.lhilmonclub.com/index.php/article_list/index/6

点下一页报错:
http://www.lhilmonclub.com/index.php/article_list/index?sort_id=6&per_page=5

config文件:
$config['uri_protocol'] = "AUTO"; 这样写的

article_list控制器:
//分页列表
$config['enable_query_strings']=true;
      $config['page_query_string']=true;
parse_str($_SERVER['QUERY_STRING'],$_GET);
      $this->load->library('pagination');
      $psize = 5; //每页记录数
if (empty ( $_REQUEST ['per_page'] )) {
   $offset = 0;
} else {
   $offset = $_REQUEST ['per_page'];
}
      $scalar = $this->article_model->get_article_num($data); //文章总数
$data['num'] = $scalar;//总数
      $data['j'] = 1;
      $data['article_list'] = $this->article_model->get_article_list($data, $offset, $psize);
      $config['base_url']='/index.php/article_list/index?sort_id='.urlencode($data['sort_id']);
      $config['total_rows'] = $scalar; //总共多少条数据
      $config['per_page'] = $psize; //每页显示几条数据
      $this->pagination->initialize($config);
$this->output->cache(5);
$this->load->view ( 'article_list', $data);


在线等!!!!!!

Hex 发表于 2010-6-10 10:01:41

有什么错?

songah 发表于 2010-6-10 10:07:17

呵呵这不是那个phpcms的网站吗?

phpers 发表于 2010-6-10 10:18:42

解决了
$config['uri_protocol']        = "ORIG_PATH_INFO";
分页的时候不能用缓存
//$this->output->cache(5);
注视掉这个就可以了
页: [1]
查看完整版本: 在线等 Linux 下分页出错