nuubers Posted May 20, 2011 Report Share Posted May 20, 2011 (edited) karo4: function ListFiles($dir) { if($dh = opendir($dir)) { $files = Array(); $inner_files = Array(); while($file = readdir($dh)) { if($file != "." && $file != ".." && $file[0] != '.') { if(is_dir($dir . "/" . $file)) { $inner_files = $this->ListFiles($dir . "/" . $file); if(is_array($inner_files)) $files = array_merge($files, $inner_files); } else { array_push($files, $dir . "/" . $file); } } } closedir($dh); return $files; } } function get{ foreach ($this->ListFiles('.') as $key=>$file){ info no faila preview skatā ar linku uz faila.. } } function open(){ foreach ($this->ListFiles('.') as $key=>$file){ info detail pec linka.. } } kaa padot ID lai atverās tikai attiecigais raksts Edited May 20, 2011 by nuubers Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.