mkdir cannot be created if the upper-level directory does not exist. Please note this. I wasted a lot of time uploading pictures as Wang Rong said.
Second knowledge point: Return the actual path function of the document:
[php]
function fileDir(){
$arr=explode('/',$_SERVER[SCRIPT_FILENAME]);
for($k=0;$k
}
return implode('/',$arrNew);
}