1
2<?php
3$dir = "/etc/php5/";
4
5// Open a known directory, and proceed to read its contents
6if (is_dir($dir)) {
7 if ($dh = opendir($dir)) {
8 while (($file = readdir($dh)) !== false) {
9 echo "filename: $file : filetype: " . filetype($dir . $file) . "\n";
10 }
11 closedir($dh);
12 }
13}
14?>
15
16