RE: How to delete a file from the server/system?

I want to delete the uploaded file when click on remove button from server permanently

dip Team Leader Asked on February 11, 2017 in PHP.
Add Comment
2 Answers

The unlink() function delete a file from server.


$file = "uploads/image.jpg";

if (!unlink($file))


echo ("Error deleting $file");




echo ("Deleted $file");



Team Leader Answered on March 19, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.