Hi,
OK, so this still isn't working for me. This is what I have :
<?php
$dirPath = opendir(´images/march´);
while ($file = readdir($dirPath)) {
if ($file != "." && $file != ".." && $file != (ereg(".html$", $file))) {
echo "The Filename is $file <BR>";
}
}
?>
In Perl it would be accomplished like this :
#!/usr/bin/perl
readdir (THEDIR, "images/march");
foreach $file (<THEDIR>) {
if ($file =~ /.html/) { print ("The file name is $file.\n"); }
I've tried ereg and preg_match, and neither seem to work. I guess I could try just matching the files I need, instead of trying to exclude some, but at this point I'm very curious on why this doesn't work!
Thanks!