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.


Dean (a new PHP user)

Code Follows........


$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
$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>\"

if (is_dir($complete_path) == true)
 print $dir_exists;

 print $dir_not_exist;
 chdir ($dir_path);
 if (mkdir ("abc",0700) == true) {
 print $dir_create_success; }
  else { print $dir_create_failure; }

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to