I try to delete directory with php code:
unlink is supposed to delete all files under $dir folder, but it gives me error message "permission denied", actually I created $dir and its files within the same php file:
why I cannot delete files with the same user privilege? can anyone help me? thanks.
Code:
unlink("$dir/.");
rmdir("$dir");
unlink is supposed to delete all files under $dir folder, but it gives me error message "permission denied", actually I created $dir and its files within the same php file:
Code:
mkdir("$dir", 0755);
copy("abc.htm", "$dir/abc.htm");
chmod("$dir/abc.htm",0755);
why I cannot delete files with the same user privilege? can anyone help me? thanks.