Advertisement
Adam_Martin

Untitled

May 16th, 2012
36
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.37 KB | None | 0 0
  1. // Инклудит файлы из заданной директории
  2. function includeDir($dirname)
  3. {
  4.    $dir = opendir($dirname);
  5.    while($file = readdir($dir))
  6.    {  // Отбор только файлов
  7.       if (is_file($dirname.'/'.$file) and $dirname.'/'.$file != '.' and $dirname.'/'.$file != '..')
  8.       {
  9.          require_once($dirname.'/'.$file);
  10.       }
  11.    }
  12. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement