Question : php mkdir recursive
Answered by : envious-earthworm-cfxdyz85y0hz
<?php
// Create a directory recursively (make sure to sanitize if taken from input as always!)
mkdir("/path/to/my/dir", 0777, true);
Source : | Last Update : Tue, 07 Jul 20
Question : php mkdir
Answered by : stefan-jilderda
// Create a directory with the permission level (optional)
<?php
mkdir("/path/to/my/dir", 0700);
?>
Source : https://www.php.net/manual/en/function.mkdir.php | Last Update : Tue, 21 Apr 20
Question : php mkdir
Answered by : akbarali
<?php
// Desired directory structure
$structure = './depth1/depth2/depth3/';
// To create the nested structure, the $recursive parameter
// to mkdir() must be specified.
if (!mkdir($structure, 0777, true)) {
die('Failed to create directories...');
}
// ...
?>
Source : https://www.php.net/manual/en/function.mkdir.php | Last Update : Sat, 11 Sep 21