need help to modify the PHP Directory Lister script?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
tom456
Forum Newbie
Posts: 22
Joined: Fri Aug 15, 2008 2:38 am

need help to modify the PHP Directory Lister script?

Post by tom456 »

hi!

i recently downloaded wonderful script which helps to list all files in directories, its called Php Directory Lister link http://greg-j.com/wp-content/uploads/20 ... pdl-v2.zip..

And my question is: is it possble to change the filename link option into download link option like the downloadimage behind the column, when somebody clicks on the filelink then the download appears instead of showing the file (.txt, .doc etc) by itself in webbrowser..

could somebody help me? :wink:
hopefully the question is understandable.. :wink:
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Re: need help to modify the PHP Directory Lister script?

Post by RobertGonzalez »

You are probably going to have to add a step in there somewhere to handle the file being requested by sending an appropriate content type header and content disposition header to force a download. Either that or make some changes to your web server to do that automatically for certain file types.
Post Reply