Vote Up 0 Vote Down

php delete a file from directory

How to delete a file from a directory.
flag
edited on 21/12/12

Answers


Vote Up 0 Vote Down
Just use the unlink function to delete a file residing inside a directory.

<?php
$file_path = "myfolder/myfile.txt";
unlink($file_path);
?>
flag | link |

Your Answer

Login before answering

Login with facebook