' : NULL; return $out; } echo getSubfolder($_SERVER['DOCUMENT_ROOT']);   function getFile($path){ foreach(scandir($path) as $item) preg_match("/\./", $item) && $item != '.' && $item != '..' ? $out .= $item.'
' : NULL; return $out; } echo getFile($_SERVER['DOCUMENT_ROOT']);   function getFileByType($path, $type = 'jpg'){ foreach(scandir($path) as $item) preg_match("/\.$type/", $item) && $item != '.' && $item != '..' ? $out .= $item.'
' : NULL; return $out; } echo getFileByType($_SERVER['DOCUMENT_ROOT']); ?>