Advertisement
Guest User

Untitled

a guest
Jun 18th, 2021
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. <?php
  2. /**
  3. *
  4. * @ This file is created by http://DeZender.Net
  5. * @ deZender (PHP7 Decoder for ionCube Encoder)
  6. *
  7. * @ Version : 4.1.0.1
  8. * @ Author : DeZender
  9. * @ Release on : 29.08.2020
  10. * @ Official site : http://DeZender.Net
  11. *
  12. */
  13.  
  14. function deleteCache($dir)
  15. {
  16. $success = 0;
  17. $error = 0;
  18. $path = @opendir($dir);
  19.  
  20. if ($path) {
  21. while ($file = @readdir($path)) {
  22. if ((gettype($file) != 'boolean') && !is_dir($file)) {
  23. if (($file != '.htaccess') && ($file != 'index.html') && ($file != '.') && ($file != '..')) {
  24. if (in_array(pathinfo($file, PATHINFO_EXTENSION), ['json', 'tmp', 'html'])) {
  25. if (unlink($dir . $file)) {
  26. $success++;
  27. continue;
  28. }
  29.  
  30. $error++;
  31. }
  32. }
  33. }
  34. }
  35.  
  36. @closedir($path);
  37. }
  38. ...............................................................................
  39. ...............................................
  40. .....................
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement