ManyMan Posted October 17, 2005 Report Share Posted October 17, 2005 lieta tāda ka uztaisīju php http://paste.php.lv/2673 Kur ieliekot mapē kādus failus tas automātiski saliek linkus lpaa Bet kaa es varu panākt lai piemeeram, ja mapee meetaajas 40 faili, lai vinjs tos sadala piemeeram pa 30, peec saadas sisteems <<1,2>> ? Link to comment Share on other sites More sharing options...
Delfins Posted October 17, 2005 Report Share Posted October 17, 2005 (edited) $countPerPage = 30; $pageNum = (int) $_GET['page']; $offset = $pageNum * $countPerPage; for ( $i=$offset; $i<$countPerPage; $i++ ) { print $files[$i]; } Edited October 17, 2005 by Delfins Link to comment Share on other sites More sharing options...
john.brown Posted October 17, 2005 Report Share Posted October 17, 2005 2 Delfins Bet vai gadijuma to nedara shita: $counPerPage = 30; $pageNum = (int) $_GET['page']; $offset = ($pageNum - 1) * $countPerPage; $lastFile = $offset + $countPerPage; for($i = $offset; $i < $lastFile; $i++) { print $files[$i]; } Link to comment Share on other sites More sharing options...
Delfins Posted October 17, 2005 Report Share Posted October 17, 2005 jap. esmu darbā, īpaši nepārbaudu kodu, tā kā nolažoties var viegli.. bet nu ideja skaidra... Link to comment Share on other sites More sharing options...
Recommended Posts