开发者

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?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜