当前位置:Gxlcms > PHP教程 > php分页类_PHP教程

php分页类_PHP教程

时间:2021-07-01 10:21:17 帮助过:5人阅读



  = 10; 

      = 10; 
      = 20; 

      =   =  Calculation_Page_Num( ->page_num = (  / -> -> Calculation_Min_Max(  = 1
         = 0 = 0
         = 0 = 0
         = 0 = 0
         ( ( ->page_num - ->page_max ) <= 0
             = 1 = ->
             = ->page_max % 2 (  === 1
                 =  = ( ->page_max - 1 ) / 2
                 = ->page_max / 2 - 1 = ->page_max / 2
             = 1 +  = ->page_num - 
             (  >=  &&  <= 
                 =  -  =  + 
                 ( (  -  ) <= 1
                     = 1 = -> = ->page_num - ->page_max + 1 = -> = ['min'] = ['max'] =  
     make_page( , , ,  = ->Calculation_Page_Num(  = ->Calculation_Min_Max(  (!("([?|&]=)",  = (,"?")===?."?":."&" = ."=0" (  >  = 
         = (  . '=[0-9]+',  . '=0',  =  = 0(  = ['min']; <= ['max'];++ (  == []['url'] = ''[]['name'] = []['no'] = []['url'] = (  . '=0',  . '=' . , []['name'] = []['no'] = ++ ( -> = ->make_before_next_link( , , ,  ( -> = ->make_first_end_link( , , ,  
     make_page_with_total( , , ,  = ->Calculation_Page_Num(  = ->Calculation_Min_Max(  (!("([?|&]=)",  = (,"?")===?."?":."&" = ."=0" (  >  = 
         = (  . '=[0-9]+',  . '=0',  =  = 0(  = ['min']; <= ['max'];++ (  == []['url'] = ''[]['name'] = []['no'] = []['url'] = (  . '=0',  . '=' . , []['name'] = []['no'] = ++ ( -> = ->make_before_next_link( , , ,  ( -> = ->make_first_end_link( , , , = (/->['total']=['DATA']= 
     make_before_next_link( , , ,  =  =  - 1 =  + 1 (  < 1 = 1[0]['url'] = ''[0]['name'] = "上一页"[0]['no'] = [0]['url'] = (  . '=0',  . '=' . , [0]['name'] = "上一页"[0]['no'] =  = (  = ( (  = 0; < ;++[]['url'] = []['url'[]['name'] = []['name'[]['no'] = []['no'++ (  > -> = ->[]['url'] = ''[]['name'] = "下一页"[]['no'] = []['url'] = (  . '=0',  . '=' . , []['name'] = "下一页"[]['no'] =  
     make_first_end_link( , , ,  =  = 1 = -> (  == 1 = 1[0]['url'] = ''[0]['name'] = "首页"[0]['no'] = [0]['url'] = (  . '=0',  . '=' . , [0]['name'] = "首页"[0]['no'] =  = (  = ( (  = 0; < ;++[]['url'] = []['url'[]['name'] = []['name'[]['no'] = []['no'++ (  == ->[]['url'] = ''[]['name'] = "尾页"[]['no'] = []['url'] = (  . '=0',  . '=' . , []['name'] = "尾页"[]['no'] =  ,省略号的分页
     * @param int $total        记录总条数
     * @param int $act_page        当前页码
     * @param string $url        url
     * @param int $maxpageicon    最大显示页码数
     * @param int $style        上一页,下一页显示样式
     * @param string $param        url参数
     
     make_page_with_points( ,,,,, = ->Calculation_Page_Num(  );        
         = ->Calculation_Min_Max(  );        
        (==0 ""(  >  = +1 = +1 ( 1:
                 = '前一页' = '后一页' 2:
                 = '<' = '>' 3:
                 = '<<' = '>>':
                 = '上一页' = '下一页' (!("([?|&]=)",  = (,"?")===?."?":."&" = ."=0"
         = (  . '=[0-9]+',  . '=0',  =  = -1 = +1
         (<= ( + 1
             ( == 1[0]['url'] = ''[0]['name'] = [0]['no'] =             
[0]['url'] = (  . '=0',  . '=' .( - 1), [0]['name'] = [0]['no'] = 
             = 1 ( = 1;  <= ; ++ ( != []['url'] = (  . '=0',  . '=' . , []['name'] = []['no'] =     
[]['url'] = ''[]['name'] = []['no'] = []['attr'] = 'current'++ = (
            ( == )    
[]['url'] = ''[]['name'] = []['no'] = []['url'] = (  . '=0',  . '=' .( + 1), []['name'] = []['no'] =   ( > ( + 1))
 ( <= ) 

                 ( == 1[0]['url'] = ''[0]['name'] = [0]['no'] =             
[0]['url'] = (  . '=0',  . '=' .( - 1), [0]['name'] = [0]['no'] = 
                 = 1 ( = 1;  <= ; ++ ( != []['url'] = (  . '=0',  . '=' . , []['name'] = []['no'] =     
[]['url'] = ''[]['name'] = []['no'] = []['attr'] = 'current'++ = (
                []['url'] = ''[]['name'] = '...'[]['no'] = ''
                [+1]['url'] = (  . '=0',  . '=' . , [+1]['name'] = [+1]['no'] = 
                [+1]['url'] = (  . '=0',  . '=' . ( + 1), [+1]['name'] = [+1]['no'] = 
 ( > ( - ))

                    [0]['url'] = (  . '=0',  . '=' .( - 1), [0]['name'] = [0]['no'] = 
                    [1]['url'] = (  . '=0',  . '=1', [1]['name'] = 1[1]['no'] = 1
                    [2]['url'] = ''[2]['name'] = '...'[2]['no'] = '' = 3 ( = ( -  + 1);  <= ; ++ ( != []['url'] = (  . '=0',  . '=' . , []['name'] = []['no'] =     
[]['url'] = ''[]['name'] = []['no'] = []['attr'] = 'current'++ = (
                    ( == )    
[]['url'] = ''[]['name'] = []['no'] = []['url'] = (  . '=0',  . '=' .( + 1), []['name'] = []['no'] = 

                    [0]['url'] = (  . '=0',  . '=' .( - 1), [0]['name'] = [0]['no'] = 
                    [1]['url'] = (  . '=0',  . '=1', [1]['name'] = 1[1]['no'] = 1
                    [2]['url'] = ''[2]['name'] = '...'[2]['no'] = '' ( = ( - ( - 2) / 2);  <= (+( - 2) / 2); ++ = ( ( != []['url'] = (  . '=0',  . '=' . , []['name'] = []['no'] =     
[]['url'] = ''[]['name'] = []['no'] = []['attr'] = 'current'++ = (
                    []['url'] = ''[]['name'] = '...'[]['no'] = ''
                    [+1]['url'] = (  . '=0',  . '=' . , [+1]['name'] = [+1]['no'] = 
                    [+2]['url'] = (  . '=0',  . '=' . ( + 1), [+2]['name'] = [+2]['no'] = 
 ?>

使用方法 :

 = ['page_no'] ? ['page_no'] : 1 = 20 = (-1)* =  +  = ->length = ->isFirstPage =  = ['SCRIPT_NAME']."?&a=". = ->make_page(,,,"page_no");

支持多种样式:

www.bkjia.comtruehttp://www.bkjia.com/PHPjc/440232.htmlTechArticle? = 10; = 10; = 20; = = Calculation_Page_Num( -page_num = ( / - - Calculation_Min_Max( = 1 = 0 = 0 = 0 = 0 = 0 = 0 ( ( -page_num - -page_max ) = 0 = 1 = - = -page_max % 2 ( === 1 =...

人气教程排行