php创建无限极目录代码

 

<?php
    //无限级目录
function dirs($path,$mode=0777){
    if(is_dir($path)){
        echo '目录已经存在!';
    }else{
        if(mkdir($path, $mode,true)){
            echo '创建成功! ';
        }else{
            echo '创建失败!';
        }
    }
}

$a = "d:/abcd/123/456/789/";
dirs($a);

 

相关文章:

  • 2021-10-03
  • 2021-07-08
  • 2021-11-26
  • 2021-06-16
  • 2022-02-27
  • 2022-12-23
猜你喜欢
  • 2021-09-01
  • 2021-06-25
  • 2022-12-23
  • 2021-10-18
  • 2021-06-13
  • 2021-06-27
  • 2021-11-22
相关资源
相似解决方案