-1
I create a folder for each user, but this creating where this my php file, I want to create in a folder inside this repository where the file, but it is not going, it is simple but I am new.
$parts = explode('/', $dir);
$file = 'dados.json';
$dir = $data;
foreach($parts as $part)
if(!is_dir($dir .= "/$part")) mkdir($dir);
file_put_contents("$dir/$file", $json);
I tried that:
$parts = explode('/', $dir);
$file = 'dados.json';
$dir = $data;
$past = 'Users'
foreach($parts as $part)
if(!is_dir($dir .= "/$part")) mkdir($dir);
file_put_contents("$past/$dir/$file", $json);