Answers for "php script to list files in directory"

PHP
4

php list all files in directory

scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array
Posted by: Guest on April-23-2020
0

php to list files

<?php

$fileList = glob('test/*.php');
foreach($fileList as $filename){
    if(is_file($filename)){
        echo $filename, '<br>'; 
    }   
}
?>
Posted by: Guest on October-18-2021

Code answers related to "php script to list files in directory"

Browse Popular Code Answers by Language