Answers for "php read folder"

PHP
0

php get files in folder

$files = array_diff(scandir($path), array('.', '..'));
Posted by: Guest on August-27-2021
-1

php list directories

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

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

Browse Popular Code Answers by Language