Question : list all files in directory php
Answered by : realy-silly-shark
$path = './';
$files = scandir($path);
$files = array_diff(scandir($path), array('.', '..'));
foreach($files as $file){ echo "<a href='$file'>$file</a>";
}
Source : | Last Update : Thu, 12 Nov 20
Question : php list all files in directory
Answered by : calm-curlew-geyjf6fvmg61
scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array
Source : | Last Update : Thu, 30 Apr 20