Update rm.php
This commit is contained in:
parent
799a01c8b1
commit
a2e38e9f0a
|
@ -1,5 +1,9 @@
|
||||||
<?php
|
<?php
|
||||||
# I recommend you use HTTPS and Basic access authentication to protect this file.
|
# I recommend you use HTTPS and Basic access authentication to protect this file.
|
||||||
|
$locale = 'en_US.utf-8';
|
||||||
|
setlocale(LC_ALL, $locale);
|
||||||
|
putenv('LC_ALL='.$locale);
|
||||||
|
|
||||||
$method = $_SERVER['REQUEST_METHOD'];
|
$method = $_SERVER['REQUEST_METHOD'];
|
||||||
switch ($method) {
|
switch ($method) {
|
||||||
case 'POST':
|
case 'POST':
|
||||||
|
@ -9,7 +13,7 @@
|
||||||
echo json_encode($files, JSON_UNESCAPED_SLASHES);
|
echo json_encode($files, JSON_UNESCAPED_SLASHES);
|
||||||
#shell_exec("echo '".json_encode($files)."' >>/tmp/out.txt 2>&1 &");
|
#shell_exec("echo '".json_encode($files)."' >>/tmp/out.txt 2>&1 &");
|
||||||
foreach ($files as $file) {
|
foreach ($files as $file) {
|
||||||
shell_exec("cd /home/downloads;rm ./'".$file."' >>/tmp/rm.txt 2>&1 &");
|
shell_exec("cd /home/downloads;rm -- ".escapeshellarg($file)." >>/tmp/rm.txt 2>&1 &");
|
||||||
}
|
}
|
||||||
exit;
|
exit;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue