Answers for "how can i get folder all file in php"

PHP
4

php get all php files in a directory

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

require all files in directory php

foreach (scandir(dirname(__FILE__)) as $filename) {
    $path = dirname(__FILE__) . '/' . $filename;
    if (is_file($path)) {
        require $path;
    }
}
Posted by: Guest on September-02-2021

Code answers related to "how can i get folder all file in php"

Browse Popular Code Answers by Language