Going out on a limb with that guess, aren't you, W.P.? 🙂
If he hadn't lost interest, I was going to suggest something like this:
$do_not_edit_arr = array('.', '..', 'edit.php', 'index.php');
$do_not_show_arr = array('dont_show_me.txt', 'dont_show_me_either.txt');
while (($file = $curdir->read()) !== false) {
if (in_array($file, $do_not_edit_arr)) {
echo 'DONOTEDIT' . '<br />';
continue;
}
if (!in_array($file, $do_not_show_arr)) {
echo '<a href="' . $_SERVER['PHP_SELF'] .
'?file=' . $file . '&dir=' . $mydir . '">' .
$file . '</a><BR>' . "\n";
}
}
We read what he wanted to do slightly differently, but the solutions are pretty close.