php mkdir 777 code example
Example 1: php mkdir recursive
<?php
// Create a directory recursively (make sure to sanitize if taken from input as always!)
mkdir("/path/to/my/dir", 0777, true);
Example 2: php mkdir with 777 permission
$oldmask = umask(0);
mkdir("test", 0777);
umask($oldmask);