PHP Create directory

Creates a directory in the server’s file system.

function makeDirectory($path) {
  if (!is_dir($path)) {
    $oldumask = umask(0);
    mkdir($path, 0777);
    umask($oldumask);
    chmod($path, 0777); // octal; correct value of mode
  }
}

Related Posts Plugin for WordPress, Blogger...

3 comments

Leave a Reply

Your email address will not be published. Required fields are marked *