I am trying to create a sub directory in PHP, but it's created in the root directory, not in the destination directory:
if($_SERVER['REQUEST_METHOD']=='POST') {
$dirName = $_POST['dirname'];
$path = $_POST['PATH'];
$dir = "../apps/Assamese_Songs/".$path."/" .$dirName."/";
if (mkdir($dir, 0777, true)) {
//header('Location: folder_manager.php');
}
}
Every time the directory is created in Assamese_Songs
directory, but I want it created in $path
.