\n"; echo " Directory listing for " . htmlentities($Dir) . "\n"; echo ""; echo "Name "; echo "Owner ID"; echo "Permissions"; echo "Size"; echo "\n"; foreach ($DirEntries as $Entry) { if ((strcmp($Entry, '.') !=0)&& (strcmp($Entry, '..') !=0)) { $FullEntryName=$Dir . "/" . $Entry; echo ""; if (is_file($FullEntryName)) echo "" . htmlentities($Entry). "\n"; else { echo htmlentities($Entry); } echo "" . fileowner($FullEntryName); if (is_file($FullEntryName)) { $perms=fileperms($FullEntryName); $perms=decoct($perms % 01000); echo " 0$perms"; echo "" . number_format(filesize($FullEntryName), 0) . " bytes"; } else { echo " <DIR>"; } echo "\n"; } } echo "\n"; ?>