Creating Nested Directories
I'm making a directory with the script seen bel开发者_运维问答ow. How would I go about creating two more directories immediately inside this directory?
<?php
$dir = $_POST['dirname'];
if( mkdir( "./store/".$dir."/" , 0777 ) )
echo "Directory of ".$dosjename." has been created successfully...";
} else {
echo "Failed to create directory...";
}
?>
If this
mkdir("./store/".$dir."/" , 0777)
creates a new directory, then surely this
mkdir("./store/".$dir."/foo/" , 0777)
mkdir("./store/".$dir."/bar/" , 0777)
creates two new directories in it?
精彩评论