Jump to content

twin

Newbie
  • Posts

    3
  • Joined

  • Last visited

twin's Achievements

Explorer

Explorer (1/14)

0

Reputation

  1. twin

    нужен код

    Наслаждайтесь ))) <?php $dir = (isset($_POST['dir']))?$_POST['dir']:null; $count = null; $files = array(); function find_new($dir) { global $count,$files; $new_dir = null; $dir_files = opendir($dir); while(false !== ($file = readdir($dir_files))) { if($file != '.' && $file != '..') $new_dir[] = $dir."/".$file; } if($new_dir) foreach($new_dir as $check ) { if(is_file($check)) { $count++; $files[] = $check."<br>"; } elseif(is_dir($check)) { find_new($check); } } } if(isset($_POST['ok'])) find_new($dir); else echo "Напишите название нужной директории"; echo ($count)?"Найдено файлов ".$count."<br><br>":null; echo implode("",$files); ?> <form action="?" method="post"> <input name="dir" type="text" /><br /> <input name="ok" type="submit" /> </form>
  2. Специально для автора топика, мож кому ещё пригодится. http://php.inkz.ru/
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy