[drop] / remove.php Repository:
ViewVC logotype

View of /remove.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1 - (download) (annotate)
Sat Jun 24 15:53:35 2006 UTC (3 years, 5 months ago) by synack
File size: 474 byte(s)
Initial import
<?php
include("resources/template.php");
print_header();

$filename = basename($_POST['filename']);
$filepath = "/var/www/drop/files/" . $filename;

if(isset($_POST['filename']) && file_exists($filepath)) {
	if(unlink($filepath)) {
		echo "File removed successfully.";
	}else{
		echo "Unable to remove file.";
	}
}
?>
<form action="remove.php" method="POST">
	<input type="text" name="filename" />
	<input type="submit" value="Remove it" />
</form>
<?php
print_footer();
?>

synack at csh.rit.edu
ViewVC Help
Powered by ViewVC 1.0.0