How to delete file using php

We can use php unlink function to delete a file.

<?php
$file_path="D:/test.txt";
if(unlink($file_path)){
 echo "success";
}else{
 echo "fail";
}
?>

 

,