This question already has an answer here:
I have looked around these links
Why does PHP think this folder doesn't exist?
No such file or directory error using mkdir
and these solutions haven't worked for me. I still get Message: mkdir(): No such file or directory
I want to create a directory called 2018 with a subfolder 01 in a directory called folder_name. This is the path from the root when I enter $_SERVER['DOCUMENT_ROOT']: "/home/digits/www.url.com/app"
This is what I have tried
$document_folder = $_SERVER['DOCUMENT_ROOT']."/".REPORT_FOLDER."/".date("Y")."/".date("m");
if(!is_dir($document_folder)){
mkdir($document_folder, 0777);
}
Could someone take a look at this and see where I have gone wrong?
</div>