1$path = './';
2$files = scandir($path);
3$files = array_diff(scandir($path), array('.', '..'));
4foreach($files as $file){
5 echo "<a href='$file'>$file</a>";
6}
1scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array