Help is_dir command driving me crazy!

From: Date: Tue, 22 Jan 2002 17:11:25 +0000
Subject: Help is_dir command driving me crazy!
Groups: php.general 
Request: Send a blank email to php-general+get-81575@lists.php.net to get a copy of this message
Can anyone tell me why this script doesn't work properly. I've coded it several others ways including using is_dir pointing to the full path. Nothing works reliably, it works sometimes/sometimes not. One interesting thing is that my PHP ecommerce app (osCommrce) is run and then my script is run it always seems to work. This to me points to some form of initialisation I'm missing. Any advice would be gratefully received. Regards, Dean (a new PHP user) Code Follows........ <?php $dir_path = "\Inetpub\wwwroot\catalog\images"; $dir = "abc"; $complete_path = "$dir_path\\$dir"; $dir_exists = "Directory already exists...can not create again<BR>"; $dir_not_exist = "Directory does not exist...will try and create new directory<BR>"; $dir_create_success = "Directory created<BR>"; $dir_create_failure = "Could not create directory<BR>"; print ("Checking to see if subdirectory \"<B>$dir_path\\$dir </B>\" exists<BR><BR>"); if (is_dir($complete_path) == true) { print $dir_exists; } else { print $dir_not_exist; chdir ($dir_path); if (mkdir ("abc",0700) == true) { print $dir_create_success; } else { print $dir_create_failure; } } ?>

« previous php.general (#81575) next »