\n". "\n". " $dirname\n". " ". " \n". " \n". " \n". "\n". "\n". "

$myname: $dirname

\n". "

$now

\n". "

 

\n". " \n"; // Keep track of columns $curcol = 0; // Allowed file extensions: $imgexts = array('jpg', 'jpeg', 'png', 'gif'); // Start scanning the directory $dir = opendir($dirname); echo " \n"; while (($filename = readdir($dir)) !== false) { // Make sure we want this file type $ext = strtolower(end(explode('.', $filename))); if (in_array($ext, $imgexts)) { if ($curcol >= $cols) { // Time to start a new row echo " \n"; $curcol = 0; } echo " \n"; $curcol++; } } closedir($dir); // Make sure the table is valid by adding blank cells if ($curcol != 0) { while ($curcol < $cols) { echo " \n"; $curcol++; } } echo " \n"; // Finish the document echo "

\n"; // Finish the tag // Display some info about the image $filesz = round(filesize($filename) / 1024, 2); echo "$filename
Size: $filesz KB
 
\n". "\n". ""; ?>