$where = array(
'username'=>array('LIKE','%' . $keyword . '%'),
'uid' =>array('NEQ',session('uid'))
);
$userinfo = M('userinfo');
$field = array('username','sex','location','intro','face80','follow','fans','weibo','uid');
$Page = new \Think\Page($count,5);// 实例化分页类 传入总记录数和每页显示的记录数
$show = $Page->show();//分页显示输出
$limit = $Page->firstRow.','.$Page->listRows;
$result = $userinfo->where($where)->field($field)->limit($limit)->select();
//重新组合结果集,得到是否已经关注与是否已经关注
$result = $this->_getMutual($result);
// dump($result);die;
//分配搜索结果集
$this->result = $result ? $result : false;
//页码
$this->count = $count;
$this->page = $Page->show();
页面调用{$page} 为空。 最佳答案
