1. Go to this page and download the library: Download anteris-dev/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/ */
anteris-dev / file-explorer example snippets
use Anteris\FileExplorer\FileExplorer;
$fileExplorer = new FileExplorer; // This uses the cwd
$fileExplorer = new FileExplorer('/users/foo'); // This uses /users/foo
$fileExplorer->createDirectory('./myFolder'); // Creates the folder here
$fileExplorer->createDirectory('/users/foo/myFolder'); // Creates the folder in /users/foo
use Anteris\FileExplorer\FileExplorer;
$fileExplorer = new FileExplorer('/users/foo');
$fileExplorer->createAndEnterDirectory('testing');
echo $fileExplorer->getCurrentDirectory(); // Returns '/users/foo/testing/'
$fileExplorer->createFile('test.txt', 'Hello world!'); // Will not overwrite test.txt
$fileExplorer->createFile('test.txt', 'Hello world!', true); // Will overwrite test.txt