$database_directory = "/inc/db";
$database_file = $database_directory . "/db.txt";
if ( is_dir($database_directory) ) {
echo "Yep, directory exists.";
else if ( file_exists($database_file) ) {
echo "Yep, file exists as well.";
}
else {
echo "Neither was found.";
}
// it should be noted that is_dir() will not return true if you have a trailing slash (from my personal experience.. it may be OS dependent)
cheers,
~kyle