Jump to content

pages


andylord

Recommended Posts

<?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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.