PHP code example of degraciamathieu / php-file-explorer
1. Go to this page and download the library: Download degraciamathieu/php-file-explorer library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
degraciamathieu / php-file-explorer example snippets
use DeGraciaMathieu\FileExplorer\FileFinder;
$fileFinder = new FileFinder(
basePath: __DIR__,
);
$files = $fileFinder->getFiles();
foreach ($files as $file) {
# DeGraciaMathieu\FileExplorer\File
$file->fullPath;
$file->displayPath;
}