多内容实现分页php $stringnums){ $pagecount = ceil($length/$stringnums); //页数 $nowp = empty($_get['p']) || $_get['p'] > $pagecount || $_get['p'] $offset = $stringnums*($nowp-1);//偏移量 $aa = mb_substr($aa, $offset, $stringnums,'utf-8');//获取内容 //$aa = preg_replace(/^/i, , $aa); //$aa = preg_replace(/$/i, , $aa); //$aa = strip_tags($aa,
); $aa = @tidy_repair_string($aa,'','utf8'); //分页条 $pagemulti1 = ;//geshe_1 for($i=1; $i $nowcss = ''; if($nowp == $i){ $nowcss = 'color:red'; } $pagemulti1 .= [$i]; } }echo $aa;echo $pagemulti1;?>tidy_repair_string这个函数的应用要记得配置php的tidy的扩展,百度一下就能配置呢!复制代码