php make folder 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
// Create a directory with the permission level (optional)
<?php
mkdir("/path/to/my/dir", 0700);
?>
Example 3: using php, how to create a folder in another folder
mkdir('images/user/15', 0777, true);