neo Posted March 23, 2004 Report Share Posted March 23, 2004 Ar ko var panaakt lai no kaut kada direktorijas izdzeestu failus. Nav svariigi kaadi. Varbuut ir kaadas funkcijas vai kaut kas tml. Paldies Link to comment Share on other sites More sharing options...
tamster Posted March 23, 2004 Report Share Posted March 23, 2004 izmantojot readdir() taisi ciklu, un dzēs visus pēc kārtas... Link to comment Share on other sites More sharing options...
tamster Posted March 23, 2004 Report Share Posted March 23, 2004 Deletes a directory and all subdirectories and their contents. <? function DELETE_RECURSIVE_DIRS($dirname) { // recursive function to delete // all subdirectories and contents: if(is_dir($dirname))$dir_handle=opendir($dirname); while($file=readdir($dir_handle)) { if($file!="." && $file!="..") { if(!is_dir($dirname."/".$file))unlink ($dirname."/".$file); else DELETE_RECURSIVE_DIRS($dirname."/".$file); } } closedir($dir_handle); rmdir($dirname); return true; } ?> http://codewalkers.com/seecode/436.html Link to comment Share on other sites More sharing options...
trinklins Posted March 23, 2004 Report Share Posted March 23, 2004 a čemodānu nedzēš permission denied :D :D :D Link to comment Share on other sites More sharing options...
Recommended Posts