Giter Club home page Giter Club logo

file-directory-list's People

Contributors

halgatewood avatar sapioit avatar yurenchen000 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

file-directory-list's Issues

Sorting not works

Hello,
I have downloaded your script and found, that the sorting settings is ignored. I have tried to sort folders by name descending, but unfortunatelly I is not possible.
Thanks a lot for any help

Problem with folders names containing dots

Nice script!

I found a small problem with folder names containting dots, the script treats them as files.

I changed line 177 from:
if( !$file_ext AND is_dir($file)) $file_ext = "dir";
to
if( is_dir($file)) $file_ext = "dir";

The $file_ext check is redundant anyway.

Folders look like files

Hi,
Thank you for your sharing. My problem with this code, my main folder looks like a file with a file icon, and when I click it, it begins to download. I just copied and pasted your index.php.1.10.txt code, and added a folder with two subfolders and files in it.
Could you help?

No working at all after control panel update (plesk)

I have an issue, it's about 2 day and i dont konw how to get it off.
After a plesk update (minor update) script doesnt work.

I can see files and folders in root directory, but folders doesnt work. Error 403 forbidden while trying to get into the folders

This is plesk log about this.
AH01276: Cannot serve directory /var/www/vhosts/XXXXXXX/httpdocs/test/CR1/: No matching DirectoryIndex (index.html,index.cgi,index.pl,index.php,index.xhtml,index.htm,index.shtml) found, and server-generated directory index forbidden by Options directive, referer: https://XXXXXXXX/test/

I didn't use any .htaccess before, i tried to use "Options +Indexes" to enable directory listing, it works, but it's "Apache listing" not the script.

I'm open to any advice.

changing $path to a user sub-directory isnt working

I have tested multiple ways to list the files in a users sub-directory with no change...

I have tried defining the $path variable at the top of the file and commenting out the included $path definition:
define('path', '/home/bob/backups');
as well as
define('$path', '/home/bob/backups');

I have also tried using the $items definitions as well:
$items = scandir( dirname(FILE) . '/home/bob/backups' );

Still no luck. Any assistance would be greatly appreciated

File upload function

Many thanks for the php script.

In next version would it be possible to add a function to upload files?

Thanks,

Download count

Not to complicate this wonderful simple script, but I've always wanted a way to implement a download count for each file.

2 feature

to be able to add alttext or description for each file ?

and preview for PDF and image files possible ?

Thank you ,

God Bless
"Jesus Loves You"
"For I know the plans I have for you,” declares the Lord, “plans to prosper you and not to harm you, plans to give you hope and a future."  Jeremiah 29:11

"For God so loved the world that He gave His only begotten Son, that whoever believes in Him should not perish but have everlasting life."  John 3:16

correct path on modal version

Hi to all,
I maked an update to get it worked also on a modal windows.
the problem was is the path, becouse on a modal windows you lose the path of the file, and you can't download it.

inside the Function display_block( $file ) I have added a line to retrive the path
$absolute_path = (@$_SERVER["HTTPS"] == "on") ? "https://" : "http://" . $_SERVER["SERVER_NAME"] . '/' . trim(dirname($_SERVER["PHP_SELF"]),'/');

then I put the result inside herf just before $file

$rtn = "<div class="block">";
$rtn .= "<a href="$absolute_path\$file" class="$file_ext"{$download_att}>";
$rtn .= " <div class="img $file_ext">";
$rtn .= " <div class="name">";

what do you think?

Best regards
Stefano

Share across multiple sites?

I'm currently coding a custom dashboard that compares my the files on my server with the commits of a Github repository. However, I'd like to share this across multiple sites.

Is there a way to put this in the base directory of my server and reference it in other sites? I'm sure it's stupid simple, but I'm a bit rusty when it comes to php.

Preventing folder listing

Firstly, great clean script, thank you for sharing!

After few attempts, I cannot figure out how to prevent folder listing. Like to have only files listed, is this possible?

If I may make a few suggestions to make your dir listing script better:

  1. Option to remove filename extension
  2. option to use title tag in file name as listing

Thanks again for sharing, really useful script.

Woody

Filetime and filesize warnings

Hey, great simple little script! Thanks for sharing.

I followed instructions @ #5 to change listing dir and it works, but getting errors like:

Warning: filemtime(): stat failed for test.csv in /opt/lampp/htdocs/testbed/filelister/filelister.php on line 243

Warning: filesize(): stat failed for test,.csv in /opt/lampp/htdocs/testbed/filelister/filelister.php on line 198

Any ideas how to solve and get the time / size showing? File Size show 0 and time is THU. JANUARY 1ST, 1970 - 01:00AM

Running PHP 7.3

Thanks again.

Ingnore directory

Would it be possible to ignore a directory just as you can ignore specif files?

Adding Icons

Hello,

Recently found this via a friend but i want to add an icon for APK files... how would i do this please?

Thanks in advanced

Size shows not working

Hi, thx for share your work.

I just downloaded the last version 1.9 and folder size always shows 4kb.
screenshot with folder size missing

note:
I have an old version without version inside and folder size works fine.
In this version I only fixed the icons becuase they were missing .
screenshot with folder size

Any idea why in the new version size is wrong?

UPDATE - 1
In the oldone there is a call to the function : format_size_from_bytes(foldersize($file))
It is missing in the version 1.9
screenshot with code compared

UPDATE - 2
You can download the UNKNOWN version with folder size feature until 2017-10-31
unknown version with folder size feature

UPDATE - 3
Just updated your last version 1.9 adding the feature for folder size.
I called it 1.9.1
Changes:

  • Comments label: "byman"
  • Added 2 functions : format_size_from_bytes() and foldersize()
  • Changed the function display_block()

You can download from the following link until 2017-10-31
file directory-list with folder size

UPDATE - 4
I am working on some other little stuff:

  • title (splitted in 3 title1,2,3)
  • better view on smarth phones. (meta viewport)
    Just little changes in progress...
    Here a preview

***[OT]
Sorry but I dont know how github works, I have an account, I need to read some. Let me give you my new code with a simple link...1.9.2 will arrive soon.

I hope you will include the folder size feature in your next version.

regards

thx

Start Path

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

Not working with ssl

When i secure my Server with SSL, index.php stops working.

Apache2 PHP7.3 Certbot

Password Protection

Dear all
First of all thanks for wonderful work.
I was wonder if it's possible add some kind of password protection or log in process ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.