Cibiņš Posted March 10, 2012 Report Share Posted March 10, 2012 Nedalec kapēc nedzēš folderi. Lapas sākumā ir error_report debugeris tik visu laiku izsviež baltu lapu un nekādas kļūdas neuzrāda. Funkcijā tiek padots $content_path='../media/site-images/'; $token=$_GET['tkn']; if($op == 'delete'){ delete_content($content_path.$token); } Pati funkcija function delete_content($dirname) { if (is_dir($dirname)) $dir_handle = opendir($dirname); if (!$dir_handle) return false; while($file = readdir($dir_handle)) { if ($file != "." && $file != "..") { if (!is_dir($dirname."/".$file)) unlink($dirname."/".$file); else delete_directory($dirname.'/'.$file); } } closedir($dir_handle); rmdir($dirname); return true; } Link to comment Share on other sites More sharing options...
aika Posted March 10, 2012 Report Share Posted March 10, 2012 (edited) ja tu esi ņēmis šo exampli: http://4rapiddev.com...ries-and-files/ (vai vienalga) tad nepārsauc funkcijas! function delete_content ...else delete_directory($dirname ... Edited March 10, 2012 by aika Link to comment Share on other sites More sharing options...
Cibiņš Posted March 10, 2012 Author Report Share Posted March 10, 2012 (edited) Neko tas nemaina. Tāpat nestrādā! Edited March 10, 2012 by Cibiņš Link to comment Share on other sites More sharing options...
aika Posted March 10, 2012 Report Share Posted March 10, 2012 vai nu atgriež false jo tādas diras nav vai nu .. Note: 1. The directory has to have Write Permission Link to comment Share on other sites More sharing options...
Cibiņš Posted March 10, 2012 Author Report Share Posted March 10, 2012 paldies atrisināju šo problēmu savādāk. :) Link to comment Share on other sites More sharing options...
Recommended Posts