×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: PHP
Posted by: userc865b
Added: Sep 27, 2017 10:32 AM
Modified: Sep 27, 2017 10:33 AM
Views: 4
Tags: php
  1. <?$dir = new DirectoryIterator($_SERVER['DOCUMENT_ROOT']."/folder1/folder2");
  2. foreach ($dir as $fileinfo) {
  3.     if (!$fileinfo->isDot()) {
  4.         if ($fileinfo->isFile())
  5.          var_dump($fileinfo->getFilename());
  6.     }
  7. }