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"; } 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' 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 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>"; 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
Archived
This topic is now archived and is closed to further replies.