Hi.
I am having a script that is creating a directory and some content, and it's working just fine.
But when I am trying to delete the content and the directory ain't working.
here is the code:
create.php
<?
mkdir("test",0777);
$dschd = fopen("test/text.txt","w+");
$scr = fwrite($dschd,"test tes te t");
fclose($dschd);
?>
delete.php
<?
$deschide = opendir("test");
while ($fisier = readdir($deschide)){
if ($fisier != "." && $fisier != ".."){
unlink("test/".$fisier);
}
}
unlink("test");
?>
the message I get is:
Warning: unlink(test) [function.unlink]: Permission denied in C:\www\xampp\htdocs\delete.php on line 8