Jump to content

How would I right it to check to see if there is a current directory at path?


ghurty

Recommended Posts

I found how to check if a file exists, but not a folder.

 

 

Thanks

 

Something like

if (!is_dir('/temp/' . $directory)) {  //If directory does not exixt
      mkdir('/temp/' . $directory , 0755); //Writable by owner
}

Thank you, I tried that, but it does not proceded past that point.

 

How do I tell it to continue processing the script after creating the directory

 

if (!is_dir('/tmp/' . $directory)) {  //If directory does not exixt
      mkdir('/tmp/' . $directory, 0750); //Writable by owner
}

$fromfile = "/tmp/" . $thisfile ;
$tofile = "/tmp/'.$directory.'/" . $thisfile ;

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.