I have a paging module

xiaoxiao2021-03-06  65

/ * Because you want to be a text database search system, you have written this, add some form of formation (the US is too bad)

** Read data can be combined with the FREAD function and Implode, such as $ msg = Implode ("" "Data.txt", FileSize ("DATA.TXT")));

** $ MSG is an array (nonsense), with FOR ($ I = 0; $ I

** I hope that I will give my (9elong) suggestion or BUG, ​​there is not much to say / 2003.10.29

** /

$ TPAGE = 18; // $ TPAGE calculation: $ TPAGE = CEIL (count ($ msg) / $ mline;

// illegal operation

IF ($ OFFSET> $ tpage || $ offset <0)

{

Echo "

illegal operation! ";

EXIT;

}

/ / Judgment the home page

IF ($ OFFSET == 0 ||! $ offet || $ offet == none)

{

Echo "

Home | Previous |

}

Else

{

echo "

Home |" ;

$ LPAGE = $ OFFSET-1;

echo " Previous |

}

// Judgment the last page

IF ($ OFFSET == $ TPAGE)

{

Echo "Next | Last page ";

}

Else

{

$ Npage = $ OFFSET 1;

echo " |

echo "

}

/ / The following can be used to make your own operation with $ OFFSET already passed.

?>

转载请注明原文地址:https://www.9cbs.com/read-111751.html

New Post(0)
CopyRight © 2020 All Rights Reserved
Processed: 0.046, SQL: 9