15 lines
373 B
PHP
15 lines
373 B
PHP
|
<?php
|
||
|
$taskDir = 'tasks';
|
||
|
include 'env_vars.php';
|
||
|
if($_POST["taskDeletePassword"] == getenv("taskDeletePassword")){
|
||
|
$files = scandir($taskDir);
|
||
|
$files = array_diff($files, array('.', '..'));
|
||
|
foreach ($files as $file) {
|
||
|
echo $file;
|
||
|
unlink($taskDir.'/'.$file);
|
||
|
}
|
||
|
echo "Files deleted";
|
||
|
} echo "wrong Password";
|
||
|
echo json_encode($_POST);
|
||
|
|
||
|
?>
|