PHP (gallery.php)
<table cellspacing="2" cellpadding="5">
<tr>
<?php
$folder = "./images/";
$handle = opendir($folder);
$i = 1;
$fileGambar = array('png', 'jpg', 'jpeg', 'gif');
while(false !== ($file = readdir($handle))){
$fileAndExt = explode('.', $file);
if(in_array(end($fileAndExt), $fileGambar)){
echo '<td style="border:1px solid #000000;" align="center">
<img src="'.$folder.''.$file.'" width="100" /><br />'.$file.'
</td>';
if(($i % 4) == 0){
echo '</tr><tr>';
}
$i++;
}
}
?>
</tr>
</table>
kok cuma mncul namanya,,, gambarnya mana?
BalasHapuskok gk di tampilin??
tutorial lengkap nya dengan upload foto pakai database ada gak om?
BalasHapus