I am developing application in PHP. There is image folder. I want to delete image from the folder When user click on delete button. My code is running well. But the UNLINK() function not working. My code is
unlink('../photo_gallery/'.$image_name['imge_name'],777);
I am getting this error
Warning: unlink() expects parameter 2 to be resource,
and if i remove 777 then it shows
Warning: unlink(../photo_gallery/): Permission denied
Please suggest.