I am logged into Windows with an administrator account.
I used the unlink($filename) function to delete a file using php but it gives me the following error:
Warning: unlink(C:/wamp/www/jedda/wp-content/uploads/) [function.unlink]: Permission denied in C:\wamp\www\Jedda\wp-content\plugins\course management\course_file.php on line 242
So how can I delete the file using php?
See the error :
You are trying to delete the folder “uploads” , not the file .
Unlinkcan delete files only NOT folder . Make sure your argument to unlink() is a valid file .