looking for setting the recursive flag to true?
<?php
// Desired folder structure
$structure = './depth1/depth2/depth3/';
// To create the nested structure, the $recursive parameter
// to mkdir() must be specified.
if (!mkdir($structure, 0, true)) {
die('Failed to create folders...');
}
// ...
?>
http://php.net/manual/en/function.mkdir.php
PHP递归建立文件夹
最新推荐文章于 2021-03-16 14:19:54 发布