首页 > 后端开发 > php教程 > CodeIgniter 搜索分页有点有关问题 帮忙看下

CodeIgniter 搜索分页有点有关问题 帮忙看下

WBOY
发布: 2016-06-13 13:52:13
原创
980 人浏览过

CodeIgniter 搜索分页有点问题 帮忙看下
我的查询条件比较多,所以可能稍微显得长了点,分页是可以用,但是点击下一页,跳转到第二页的时候,下面的当前页并不是第二页!请指教。

主要问题就是,点击下一页的时候,已经跳转到下一页,但是当前页显示不正确!控制器
PHP codefunction people_daozhen($askdate,$askdate2,$name,$age,$age2,$phone,$sex,$zxjb,$comefrom,$area){
   
   
  if(!empty($_POST['askdate'])){
  $data ['askdate']=$_POST['askdate'];
  }
   
  if(!empty($_POST['askdate2'])){
  $data ['askdate2']=$_POST['askdate2'];
  }
  if(!empty($_POST['name'])){
  $data ['name']=$_POST['name'];
  }
  if(!empty($_POST['age'])){
  $data ['age']=$_POST['age'];
  }
  if(!empty($_POST['age2'])){
  $data ['age2']=$_POST['age2'];
  }
  if(!empty($_POST['phone'])){
  $data ['phone']=$_POST['phone'];
  }
  if(!empty($_POST['sex'])){
  $data ['sex']=$_POST['sex'];
  }
  if(!empty($_POST['zxjb'])){
  $data ['zxjb']=$_POST['zxjb'];
  }
  if(!empty($_POST['comefrom'])){
  $data ['comefrom']=$_POST['comefrom'];
  }
  if(!empty($_POST['area'])){
  $data ['area']=$_POST['area'];
  }
   
   
  $this->load->helper ( 'url' );
  $this->load->database();  
  $this->load->library ( 'pagination' );
   
   
  $config ['per_page'] = '10';
  $config ['base_url'] = base_url(). 'index.php/people/people_daozhen/'.$askdate.'/'.$askdate2.'/'.$name.'/'.$age.'/'.$age2.'/'.$phone.'/'.$sex.'/'.$zxjb.'/'.$comefrom.'/'.$area;
   
  $this->load->model ( 'people_mdl','',TRUE );
 
  $data ['datalist'] = $this->people_mdl->people_list2 ( $config ['per_page'], $this->uri->segment ( 13 ) ,$askdate,$askdate2,$name,$age,$age2,$phone,$sex,$zxjb,$comefrom,$area);
  $config ['total_rows'] =$this->people_mdl->people_sum2($askdate,$askdate2,$name,$age,$age2,$phone,$sex,$zxjb,$comefrom,$area);
   
  $config['uri_segment'] = 3;
  $config ['full_tag_open'] = '

';
  $config ['full_tag_close'] = '

';
  $config ['first_link'] = '首页';
  $config ['first_tag_open'] = '
  • '; 
      $config ['first_tag_close'] = '
  • ';
      $config ['last_link'] = '尾页'; 
      $config ['last_tag_open'] = '
  • ';
      $config ['last_tag_close'] = '
  • ';
      $config ['next_link'] = '下一页';
      $config ['next_tag_open'] = '
  • ';
      $config ['next_tag_close'] = '
  • ';
      $config ['prev_link'] = '上一页';
      $config ['prev_tag_open'] = '
  • ';
      $config ['prev_tag_close'] = '
  • ';
      $config ['cur_tag_open'] = '
  • ';
  • 相关标签:
    来源:php.cn
    本站声明
    本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系admin@php.cn
    热门教程
    更多>
    最新下载
    更多>
    网站特效
    网站源码
    网站素材
    前端模板