Is there a way that I can check if a directory is valid prior to opening it? Because when I have it in a loop it will constantly print out the error message forever. So if I can check prior to opening it that would be awesome! Thanks!
http://us.php.net/manual/en/function.is-dir.php