The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Static HTML File Autopopulate, Static file DL link autopopulation
rabbit93
post Dec 26 2019, 03:06 PM
Post #1





Group: Members
Posts: 3
Joined: 26-December 19
Member No.: 27,096



I am pretty well versed in HTML, CSS, and JavaScript. I have been creating a small project on the side. I for the life of me can not figure out a way to create a script that will automatically search a specific web directory and then return the results on a specific page as download links. Maybe I am forgetting something? I have long since abandoned static sites since HTML5, CSS3, and bootstrap but a wanted to do a small project using static. No SSI, CGI, and so on. Can anyone else think of anything?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 26 2019, 05:37 PM
Post #2


.
********

Group: WDG Moderators
Posts: 8,295
Joined: 10-August 06
Member No.: 7



Only server-side scripts (e.g. CGI, PHP) are able to search directories (client-side javascript can't do that).

You can also let the server itself generate a list of links to a directory's content, e.g. using a .htaccess directive in Apache: http://www.htaccess-guide.com/disable-directory-listings/
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
rabbit93
post Dec 26 2019, 07:23 PM
Post #3





Group: Members
Posts: 3
Joined: 26-December 19
Member No.: 27,096



QUOTE(Christian J @ Dec 26 2019, 06:37 PM) *

Only server-side scripts (e.g. CGI, PHP) are able to search directories (client-side javascript can't do that).

You can also let the server itself generate a list of links to a directory's content, e.g. using a .htaccess directive in Apache: http://www.htaccess-guide.com/disable-directory-listings/



That is too bad. I knew about letting Apache list an index but i don't want the standard directory index. I was hoping to have my own custom HTML Directory Index. Anyway to replace the default Apache Directory Index Listing with my own Customized one?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Dec 27 2019, 07:37 AM
Post #4


.
********

Group: WDG Moderators
Posts: 8,295
Joined: 10-August 06
Member No.: 7



QUOTE(rabbit93 @ Dec 27 2019, 01:23 AM) *

Anyway to replace the default Apache Directory Index Listing with my own Customized one?

Actually it seems you can, even CSS seems possible: https://perishablepress.com/better-default-...-with-htaccess/ (I haven't tried this myself).
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
rabbit93
post Dec 27 2019, 01:32 PM
Post #5





Group: Members
Posts: 3
Joined: 26-December 19
Member No.: 27,096



QUOTE(Christian J @ Dec 27 2019, 08:37 AM) *


Actually it seems you can, even CSS seems possible: https://perishablepress.com/better-default-...-with-htaccess/ (I haven't tried this myself).

Hey! Awesome. I started to change my and just php opendir and readir until i saw your reply. Thanks ill check it out.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 16th February 2020 - 04:22 PM