<?php
function delete( $file )
{
if( unlink( $file ) )
{
echo( "$file<br>has been deleted<hr>" );
}
else
{
echo( "Unable to delete $file<hr>" );
}
}
?>
<html>
<head>
<title>Deleting files</title>
<head>
<body>
<?php
# for Linux use...
#$file_A = "/errlog_bak";
#$file_B = "/errlog_not";
# for Windows use...
$file_A = "C:\\errlog.bak";
$file_B = "C:\\errlog.not";
delete($file_A);
@delete($file_B);
?>
</body>
</html>
|