PHP Directory Viewer - List All Files In A Directory

PHP

This is a simple PHP script to list all files in a directory basically this is called PHP Directory Viewer.

This uncomplicated PHP project will list all the files and folders of the specified paths. You can add this directory viewer to your website to list different files of your website. This is a responsive and beautiful directory viewer which will blow up your mind.

Preview/Demo:

This is the preview of this PHP Directory Viewer you can see it below. It looks like this.

I haven't provided the source code of this because it was lengthy and was affecting my website page that's why I was unable to provide the source code but don't worry about the source code I have included the project files you can download the project file from the link below and have fun.

Use your localhost server to see this project live.

This directory viewer is having two themes light and Dark thing you like you can change that in the index.php file.

Now all the settings provided below will be founded in index.php file.

To change the theme replace light in $color = "light";. The acceptable values are light and dark.

Ignore Files:

If You want to ignore any file and you don't want to be listed in this directory viewer you can add that file name here in the ignore file list $ignore_file_list = array( ".htaccess", "Thumbs.db", ".DS_Store", "index.php" );

You can also ignore the files using an extension just add the extension name in ignore extension list here $ignore_ext_list = array( );

Sort Files:

You can also sort your files in different ways by default the files are sorted in ascending order and by name you can change the sort style of files and folders by specifying the suit style insert by variable here $sort_by = "name_asc";.

Specified values for sorting styles are name_asc, name_desc, date_asc, date_desc you can choose any.

Toggle Sub-folders:

If you want to set the functionality of Toggle sub-folders you can also do that by default it is also added before but you can customize it by simply replacing the variable value with true or false here. $toggle_sub_folders = true;.

More Settings:

You can also ignore the empty folders and this PHP Directory Viewer is having many other features.

You can download the project files from the link below and see all the settings in its description of all the settings provided in the code using the comments you can see them.

Download PHP Directory Viewer

Download Project
Tags :

Related Posts

M.Muzammil

I am Muzammil, a Self-taught Web Designer & Developer. I haven't yet completed my college degree. Started learning programming at the age of 12 and still learning. I love to work in Javascript and make eye-catchy designs. Free for your calls :)

Be The First To Comment

Add Comment