andylord Posted July 13, 2009 Share Posted July 13, 2009 <?php // opens images folder if ($handle = opendir('../Pictureupload/thumbs/')) { while (false !== ($file = readdir($handle))) { // strips files extensions $crap = array(".jpg", ".jpeg", ".JPG", ".JPEG", ".png", ".PNG", ".gif", ".GIF", ".bmp", ".BMP", "_", "-"); $newstring = str_replace($crap, " ", $file ); //asort($file, SORT_NUMERIC); - doesnt work // hides folders, writes out ul of images and thumbnails from two folders if ($file != "." && $file != ".." && $file != "index.php" && $file != "Thumbnails") { echo "<li><a href=\"thumbs/$file\" class=\"thickbox\" rel=\"gallery\" title=\"$newstring\"><img src=\"../Pictureupload/thumbs/$file\" alt=\"$newstring\" width=\"300\" </a></li>\n";} } closedir($handle); } ?> i am simplying getting images from a directory but i would like them to be in pages not just on one big page, and to display page numbers at the bottom anyone have any idea on how i would go about in doing this or have a link to a tutorial maybe ? thanks in advance for help Link to comment https://forums.phpfreaks.com/topic/165862-pages/ Share on other sites More sharing options...
Hybride Posted July 13, 2009 Share Posted July 13, 2009 Php Gallery System? Link to comment https://forums.phpfreaks.com/topic/165862-pages/#findComment-874881 Share on other sites More sharing options...
.josh Posted July 14, 2009 Share Posted July 14, 2009 I've you're looking to build your own script, the term you are looking for is "pagination" here is a tutorial about it http://www.phpfreaks.com/tutorial/basic-pagination Link to comment https://forums.phpfreaks.com/topic/165862-pages/#findComment-874907 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.