Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php // function to delete all files and subdirectories from folder function deleteAll(..
Decoded Output download
<?php
// function to delete all files and subdirectories from folder
function deleteAll($dir, $remove = false) {
$structure = glob(rtrim($dir, "/").'/*');
if (is_array($structure)) {
foreach($structure as $file) {
if (is_dir($file))
deleteAll($file,true);
else if(is_file($file))
unlink($file);
}
}
if($remove)
rmdir($dir);
}
// folder path that contains files and subdirectories
$path = "./ss/dd";
// call the function
deleteAll($path);
echo "All files and folders deleted successfully.";
exit;
?>
Did this file decode correctly?
Original Code
<?php
// function to delete all files and subdirectories from folder
function deleteAll($dir, $remove = false) {
$structure = glob(rtrim($dir, "/").'/*');
if (is_array($structure)) {
foreach($structure as $file) {
if (is_dir($file))
deleteAll($file,true);
else if(is_file($file))
unlink($file);
}
}
if($remove)
rmdir($dir);
}
// folder path that contains files and subdirectories
$path = "./ss/dd";
// call the function
deleteAll($path);
echo "All files and folders deleted successfully.";
exit;
?>
Function Calls
rtrim | 1 |
deleteAll | 1 |
Stats
MD5 | 04504b8c1098db1a676e39b9d78f0481 |
Eval Count | 0 |
Decode Time | 53 ms |