Delete a file in the file system. Note that this file system we’re talking about is the server’s file system. PHP nor other web-based programming language deletes a file system on the client’s side.

function deleteFile($filename) {
  $do = unlink($filename);

  if ($do=="1") {
    echo "The file was deleted successfully.";
  } else {
    echo "There was an error trying to delete the file.";
  }
}

Related Posts Plugin for WordPress, Blogger...