this, <?php
$imageDirectory = '.';
$allowedExtensions = 'png,jpg,gif,bmp';
$dir = opendir($imageDirectory);
$ext = explode(',',$allowedExtensions);
if ($dir) {
while (false !== ($entry = readdir($dir))) {
$info = pathinfo($entry);
if (in_array($info['extension'],$ext)) {
echo "$entry\n";
}
}
closedir($dir);
}
?>
have to be added into the capx?