I'm confused about all the file system functions in php (glob, scandir, opendir...)
I simply want a list of folders and files - like in a file explorer
something like this:
$path = 'home';
$arr = content of $path;
foreach($arr as $el){
if($el is a folder){echo "<div class='folder'>$el</div>";}
elseif($el is a file){echo "<div class='file'>$el</div>";}
}
Any help?