<?php
if ($handle = opendir('/usr/local/www')) {
print "<select name='files'>\n";
while (false !== ($file = readdir($handle))) {
$ext = substr(strrchr($file, "."), 1);
if ($ext == "php") print "<option value='$file'>" . $file . "</option>";
}
print "</select>";
closedir($handle);
}
?>