having a bit of trouble, and new to this. can't find exact help in the archive or manual so..
on the first line of my php page, i want to check to see if a directory exists -- if so, do nothing
if not, send the header to redirect to an error page
the problem, is that using
if($handle == opendir($myDir)) or header("Location:http://this.com/error.html");
or
if($handle == opendir($myDir)){
// do nothing
} else {
header("Location:this.com/error.html");
}
will not work, because the failed opendir creates an error message, and php can't send the header after an error message is written to the user, so i get another error message too
ugh.
any help would be appreciated