madspof Posted August 29, 2007 Share Posted August 29, 2007 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"; } Quote Link to comment https://forums.phpfreaks.com/topic/67255-can-anyone-see-why-this-checking-script-is-not-working-correctly/ Share on other sites More sharing options...
sasa Posted August 29, 2007 Share Posted August 29, 2007 are you look for directory 'dir'? if not change to if ( dir_exists($dir) ) { for dir 'madspof' Quote Link to comment https://forums.phpfreaks.com/topic/67255-can-anyone-see-why-this-checking-script-is-not-working-correctly/#findComment-337370 Share on other sites More sharing options...
madspof Posted August 29, 2007 Author Share Posted August 29, 2007 sorry to waste your time how did i not see that lol thnks madspof Quote Link to comment https://forums.phpfreaks.com/topic/67255-can-anyone-see-why-this-checking-script-is-not-working-correctly/#findComment-337373 Share on other sites More sharing options...
madspof Posted August 29, 2007 Author Share Posted August 29, 2007 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>"; Quote Link to comment https://forums.phpfreaks.com/topic/67255-can-anyone-see-why-this-checking-script-is-not-working-correctly/#findComment-337386 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.