How to create multiple folders inside another folder using php? -
initially created folder name coming sql result stored in variable after creating folder want create 2 folders inside folder.so below 3 lines have written creating folders.
mkdir($r,0777,true); //creating first folder without error mkdir($r/'input',0777,true); // not able create folder inside first folder mkdir($r/'output',0777,true); //not able create folder inside first folder
$r/'input'
not valid path here. it's not string, because you're doing arithmetic operation here. need put /
string , concatenate $r
using dot:
$r . '/input'
the same output
folder.
try do:
mkdir($r,0777,true); mkdir($r . '/input',0777,true); mkdir($r . '/output',0777,true);
Comments
Post a Comment