Beste,
Ik ben bezig met een website en ik heb een script dat alle foto's die je in een map stopt word dan ge showt in een bestand maar nu zijn niet alle bestanden even groot de ene is groter dan de ander.
Dit is het script:
<?php
echo '
<b>Emoticons: </b>
<table width="42">
<tr>
<td>
<table cellspacing="0" cellpadding="5" width="100px">';
$image_types = array("jpg","gif","bmp","png","jpeg");
$plaatjes_reeks = "";
$mapnaam = "/_img";
if ( ereg('..',$mapnaam) || ereg('//',$mapnaam) ){
$mapnaam = "/_img";
}
$map = opendir(".{$mapnaam}");
$count = 0;
while (false!==($bestand = readdir($map))) {
if ($bestand != "." && $bestand != "..") {
$ext = explode('.',$bestand);
$extl = sizeof($ext) - 1;
$ext = strtolower($ext[$extl]);
if ( in_array($ext,$image_types) ){
if($count%3 == 0) {
$plaatjes_reeks .= '</tr><tr>';
}
$plaatjes_reeks .= "<td><img src=\"_img/" . $bestand . "\"/></td>";
$count++;
}
}
}
if ( $plaatjes_reeks != "" ){
echo ($plaatjes_reeks);
}
closedir($map);
echo '
</table>
</td>
</tr>
</table>';
?>
Kan iemand helpen.
Alvast bedankt
1.680 views