WendiKidd
0
Q:

php get all php files in a directory

$path    = './';
$files = scandir($path);
$files = array_diff(scandir($path), array('.', '..'));
foreach($files as $file){
  echo "<a href='$file'>$file</a>";
}
1
foreach(glob('includes/*.php') as $file) {
    ...
}
3
scandir ( string $directory [, int $sorting_order = SCANDIR_SORT_ASCENDING [, resource $context ]] ) : array
2

New to Communities?

Join the community