I'm trying to create a directory through PHP on my local Linux server, but I'm not getting it. It gives the following error:
mkdir(): Permission denied...
I have tried the following codes:
if(!file_exists($diretorio)){
mkdir("/../../".$ano,0777,true);
}
and that too:
if(!file_exists($diretorio)){
mkdir("/../../".$ano);
chmod("../../".$ano,0777);
}
and by disenchantment of conscience:
if(!file_exists($diretorio)){
mkdir("/../../".$ano,0777,true);
chmod("../../".$ano,0777);
}
but all return that error. The root directory is 777. Does anyone know how I can resolve this?