halgatewood / file-directory-list

Free Super Clean PHP File Directory Listing Script
https://halgatewood.com/free/file-directory-list/
366 stars 148 forks source link

Start Path #24

Open grechucia opened 4 years ago

grechucia commented 4 years ago

Greetings! Is there a way to define "storage" folder?. For example, i want to directory lister start from folder "storage", without showing folder "other_files". I know, easiest way is simply move index.php to "storage" folder, but i need the way i've described.

-ROOT_FOLDER ----index.php ----storage ----------------1.jpg ----------------2.jpg ----------------3.jpg ----------------4.jpg ----------------file1.mp4 ----------------file2.mp4 ----other_files ----------------file1.jpg ----------------file2.mp4

halgatewood commented 4 years ago

Try changing the line at the bottom from this: $items = scandir( dirname(__FILE__) ); To this: $items = scandir( dirname(__FILE__) . '/storage');

beeell1 commented 4 years ago

It seems the line below also needs to be changed from this: build_blocks( $items, false ); To: build_blocks( $items, 'storage' ); Hope this helps.