Previous
Next
-
$picDir = "gallery";
$percent = 0.15;
$n=0;
if ($handle = opendir($picDir)) {
while (false !== ($picFile = readdir($handle))) {
if ($picFile != "." && $picFile != "..") {
$picPath = $picDir ."/". $picFile;
list($width, $height) = getimagesize($picPath);
$n=$n+1;
$nWidth = $width * $percent;
$nHeight = $height * $percent;
echo "
- "; //if ($n == 4) { $n=0; echo "
"; } } } closedir($handle); } ?>