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
  }
}

Found this useful? Donations appreciated to help keep this blog alive.

Related Posts Plugin for WordPress, Blogger...