Jump to content

can anyone see why this checking script is not working correctly


madspof

Recommended Posts

This script tells me that it cannot find the directory that i have told it to find can anyone see why?

madspof thnks

 

$dir = "madspof";
function dir_exists( $dir ) {
   $open = ( opendir( $dir ) ) ? true : false;
   return $open;
}

if ( dir_exists( "dir" ) ) {
   print "Found that directory";
}{
print "Did not find that directory";
}

okay well i did all that like standard but couldnt get a result so i tried using isset but i am not having any look could some one tell what i would need to do

madspof thnks

 

if (isset($dir)) {
   echo "Found that directory";
}{
echo "Did not find that directory";
}
echo "$dir <BR>";

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.