php mkdir function 777 code example Example: php mkdir with 777 permission $oldmask = umask(0); mkdir("test", 0777); umask($oldmask);