Answers for "php find file in directory"

PHP
4

php get all php files in a directory

foreach(glob('includes/*.php') as $file) {
    ...
}
Posted by: Guest on March-21-2020
0

php get files in folder

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

php dirpath multiple file extensions

$files = glob("/path/to/directory/*.{jpg,gif,png}", GLOB_BRACE);
print_r($files);
Posted by: Guest on October-25-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

Code answers related to "php find file in directory"

Browse Popular Code Answers by Language