hi! i have problem with this rmdir. How can i remove the directory and the image inside of my dir?
this is my PHP code:
$dir="image/";
$arr=array(1=>"pig.jpg",2=>"animal.jpg");
$x=0;
while($x<2)
{
if(unlink($dir.$arr[$x]))
echo "success";
else
echo "failed";
}
rmdir($dir);
but when i run the error occur.
Warning: the directory is not empty.. please help me.