Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> Usuwanie katalogu z plikami - problem rmdir() warning, Problem rmdir() folder nie jest pusty
merys
post
Post #1





Grupa: Zarejestrowani
Postów: 7
Pomógł: 0
Dołączył: 24.06.2003

Ostrzeżenie: (0%)
-----


Witam .
mam problem z usunieciem katalogu z plikami. ponizszy kod wykonuje na Webser 1.2 i wszystko pieknie dziala. Wgralem to na serwer webd.pl i pokazuje komunikat .

Warning: rmdir(../oferty/0) [function.rmdir]: Directory not empty in C:\WebServ\httpd-users\invest\panel\view_dom.php on line 130

w lini 130 znajduje sie rmdir($dir);


  1. <?php
  2. if($co=="delete")
  3.  {
  4. $sql = "delete from oferta where d_id='".$d_id."'";
  5. $wynik = mysql_query($sql)or
  6. die("Bląd w zapytaniu produkt delete");
  7.  
  8.  
  9. $dir = '../oferty/'.$d_id.'/';
  10.  
  11. //--------------------------------------------------------------------------------------------
  12. function removeDir($dir)
  13.  {
  14. @$fd=opendir($dir);
  15. if(!$fd) return false;
  16. while (($file = readdir($fd)) !==false)
  17.  {
  18. if($file =="." || $file =="..") continue;
  19. if(is_dir($dir."".$file))
  20.  {
  21. @removeDir($dir."".$file);
  22.  }
  23. else
  24.  {
  25.  
  26. @unlink("$dir..$file");
  27.  
  28.  }
  29.  }
  30.  closedir($fd);
  31.  rmdir($dir);
  32.  }
  33.  
  34.  
  35. removeDir('../oferty/'.$d_id); 
  36.  
  37.  
  38.  
  39.  }
  40. ?>

po wykonaniu powyższej funkcji wyświetla się komunikat

Warning: rmdir(../oferty/0) [function.rmdir]: Directory not empty in C:\WebServ\httpd-users\invest\panel\view_dom.php on line 130

katalog oferty ustawiony jest na 777

Prosze o pomoc . Nie mam pojecia o co chodzi i dlaczego to nie dziala na serwerze zdalnym a lokalnie chodzi.
Go to the top of the page
+Quote Post

Posty w temacie


Reply to this topicStart new topic
1 Użytkowników czyta ten temat (1 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 22.08.2025 - 05:01