<?php
header('Content-type:text/html;charset=utf8');
echo "Loading time:".date('Y-m-d H:i:s');
sleep(5);
echo "<br>";
echo "End time:".date('Y-m-d H:i:s');
// 多级目录新建
function createFolder($path){
    if(!file_exists($path)){
        createFolder(dirname($path));
        mkdir($path, 0777);
    }
}

createFolder("/Library/WebServer/Documents/aa/bb/cc");
?>

php使用递归创建多级目录

相关文章:

  • 2021-12-03
  • 2022-12-23
  • 2021-05-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-03
猜你喜欢
  • 2021-12-05
  • 2021-08-20
  • 2021-07-31
  • 2022-12-23
  • 2021-06-12
  • 2021-06-29
相关资源
相似解决方案