I need help with a function to create a 2 level directory for the following situations:
Thanks for the help.
Use the third parameter of mkdir()
:
recursive Allows the creation of nested directories specified in the pathname. Defaults to FALSE.
$path = '/path/to/folder/with/subdirectory';
mkdir($path, 0777, true);