Click on a thumbnail to view image
'; $main = "."; $dir = opendir($main); // unbutton it $i = 1; // for column count while($filename = readdir($dir)) { { if (filetype($filename) == "file" && $filename != "index.php") // dont show index.php (this file) - skip any file you dont want viewed // format as ( && $filename != "filename.ext" ) inside the () behind "index.php" { if ($i <= '6') // column count (designed for 5 columns wide - change the 5 for however many wanted) { $i = $i + '1'; echo ' '; // display it } else { $i = '1'; // reset column count and change rows echo ' '; $i = $i + '1'; // add 1 to counter to get to next row echo ' '; // display it } } } } closedir($dir); // button it up echo '

'.$filename.'
'.filesize($filename).' bytes.

'.$filename.'
'.filesize($filename).' bytes.
'; exit; ?>