wordpress php 分页出现乱码
伊谢尔伦
伊谢尔伦 2017-05-27 17:43:38
0
1
490

请问是哪里出现问题了么

    function wp_admin_pagenavi($total_count, $number_per_page=20){
    
        $current_page = isset($_GET['paged'])?$_GET['paged']:1;
    
        if(isset($_GET['paged'])){
            unset($_GET['paged']);
        }
    
        $base_url = add_query_arg($_GET,admin_url('admin.php'));
    
        $total_pages    = ceil($total_count/$number_per_page);
    
        $first_page_url    = $base_url.'&paged=1';
        $last_page_url    = $base_url.'&paged='.$total_pages;
        
        if($current_page > 1 && $current_page < $total_pages){
            $prev_page        = $current_page-1;
            $prev_page_url    = $base_url.'&amp;paged='.$prev_page;
    
            $next_page        = $current_page+1;
            $next_page_url    = $base_url.'&amp;paged='.$next_page;
            $last_page_url    = $base_url.'&amp;paged='.$total_pages;
        }elseif($current_page == 1){
            $prev_page_url    = '#';
            $first_page_url    = '#';
            if($total_pages > 1){
                $next_page        = $current_page+1;
                $next_page_url    = $base_url.'&amp;paged='.$next_page;
            }else{
                $next_page_url    = '#';
            }
        }elseif($current_page == $total_pages){
            $prev_page        = $current_page-1;
            $prev_page_url    = $base_url.'&amp;paged='.$prev_page;
            $next_page_url    = '#';
            $last_page_url    = '#';
        }
        

伊谢尔伦
伊谢尔伦

小伙看你根骨奇佳,潜力无限,来学PHP伐。

全部回复(1)
给我你的怀抱

编码集是否改了啊

热门教程
更多>
最新下载
更多>
网站特效
网站源码
网站素材
前端模板
关于我们 免责声明 Sitemap
PHP中文网:公益在线PHP培训,帮助PHP学习者快速成长!