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}
1foreach (scandir(dirname(__FILE__)) as $filename) {
2 $path = dirname(__FILE__) . '/' . $filename;
3 if (is_file($path)) {
4 require $path;
5 }
6}
7
1scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array