I have this script
<?php
$real_path = realpath("test/");
$d = dir($real_path);
while (false !== ($entry = $d->read()))
{
if($entry != "." && $entry != "..")
{
echo "<a href=\"$entry\">$entry</a>\n";
}
}
$d->close();
?>
All my fiddling either gets me an error or the list of files as well as the directories.
I'm trying to get DIRECTORIES only.
What is the trick here?