echo '
' . "
";
Здесь $ saving iS: userposts/hemlata993/94/5f2628f30cc623.13126045.jpg
the /5f2628f30cc623.13126045.jpg
$image = 'userPosts/hemlata993';
function listFolderFiles($dir){
$ffs = scandir($dir);
unset($ffs[array_search('.', $ffs, true)]);
unset($ffs[array_search('..', $ffs, true)]);
// prevent empty ordered elements
if (count($ffs) < 1)
return;
echo '
- ';
foreach($ffs as $ff){
echo ' - '.$ff;
$saving = "$dir/$ff";
$saving .= ''.$ff;
echo "$saving";
echo '
' . "
";
if(is_dir($dir.'/'.$ff)) listFolderFiles($dir.'/'.$ff);
echo '';
}
echo '
}
listFolderFiles($image);
Подробнее здесь: https://stackoverflow.com/questions/632 ... -displayed
Мобильная версия