Php provides simple paging for text files ,. Php provides a simple paging function for text files. php provides a simple paging function for text files! DOCTYPEhtmlheadmetahttp-equivContent-typecontenttexthtml; charsetgb php provides simple paging for text files,
Php pagination of text files
Paging
";} If (ord (substr ($ str, $ I, 1)> 0xa0) {$ tmp_str. = substr ($ str, $ I, 2); $ I ++;} else {$ tmp_str. = substr ($ str, $ I, 1) ;}return $ tmp_str;} // if (isset ($ _ GET ['Page']) {$ page = $ _ GET ['Page'];} else {$ page = 1 ;}$ counter = file_get_contents ("example.txt "); $ length = strlen ($ counter); $ page_count = ceil ($ length/400); $ pre_str = m_substr ($ counter, 0, ($ page-1) * 400 ); $ now_str = m_substr ($ counter, 0, $ page * 400); echo substr ($ now_str, strlen ($ pre_str), strlen ($ now_str) -strlen ($ pre_str); echo"
"; Echo" current page ". $ page. "/". $ page_count; echo "Index"; if ($ page> 1) {echo "$ page-1 ). "'> Pre";} if ($ page <$ page_count) {echo "$ page + 1 ). "> Next";} echo "$ page_count> End";?>
Paging, php simple implementation of text file paging function! DOCTYPEhtmlhead meta http-equiv = "Content-type" content = "text/html"; charset = "gb...