creat new folder with php code example
Example 1: create folder php
// Create folder if not exist
$folderName = 'images/gallery';
$config['upload_path'] = $folderName;
if(!is_dir($folderName))
{
mkdir($folderName, 0777);
}
Example 2: 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);