//echo $_SERVER['SCRIPT_NAME'];
$folderName = get_post_meta(get_the_ID(), 'folder', true)."/";
$imgAlt = get_post_meta(get_the_ID(), 'imgAlt', true);
$dir = getcwd().'/gallery/'.$folderName;
$files = scandir($dir."thumbs");
// echo sizeof($files);
// echo getcwd();
foreach($files as $file) {
//do your work here
//echo $file;
if($file!="." && $file!=".."){
echo "
\n";
echo "\n";
echo "\n";
}
}
?>