0
Personal beauty? I have a problem which is as follows. I use the following code to create a directory.
//verifica se existe diretorio para criar
$dir = 'imagens/'.$id_produto.'/';
if(!file_exists($dir)){
mkdir($dir, 0777);
}else{
echo "Erro ao criar diretório";
}
But even going there in the folder and leaving it clean, running this code it points out that the directory exists. Already displayed separately echo file_exists($dir);
and it returns me 1 as if the directory existed. The strange thing is that it came to work normally and now I am with this problem. any idea?
Have you checked whether this relative path of var "$dir" is even pointing to where you think? What about the folder permissions?
– ThiagoYou
I forgot that I changed this folder code and I was actually creating in another place. Thanks ai for the help.
– Bruno