开发者

Creating Nested Directories

开发者 https://www.devze.com 2023-03-30 22:28 出处:网络
I\'m making a directory with the script seen bel开发者_运维问答ow. How would I go about creating two more directories immediately inside this directory?

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

精彩评论

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