Answers for "get filelist from file php"

PHP
9

list all files in directory php

$path    = './';
$files = scandir($path);
$files = array_diff(scandir($path), array('.', '..'));
foreach($files as $file){
  echo "<a href='$file'>$file</a>";
}
Posted by: Guest on November-05-2020
-1

php list directories

$dir = '.';
$directories = glob($dir . '/*', GLOB_ONLYDIR);
Posted by: Guest on July-22-2020

Browse Popular Code Answers by Language