Guest User

Untitled

a guest
Mar 12th, 2025
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.28 KB | None | 0 0
  1. <?php
  2.  
  3. $urls = [
  4.     gitarre1.html,
  5.     gitarre2.html,
  6.     gitarre4.html
  7. ];
  8. $working_dir = __DIR__ . "/angebote/";
  9. foreach(scandir($working_dir) as $file){
  10.   if($file===".." or $file===".") continue;
  11.   if (!in_array($file,$urls) {
  12.     unlink( $working_dir . $file );
  13.   }
  14. }
  15.  
  16. ?>
Advertisement
Add Comment
Please, Sign In to add comment