Posted by: rabbit93 Dec 26 2019, 03:06 PM
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?
Posted by: Christian J Dec 26 2019, 05: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/
Posted by: rabbit93 Dec 26 2019, 07:23 PM
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?
Posted by: Christian J Dec 27 2019, 07:37 AM
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-directory-views-with-htaccess/ (I haven't tried this myself).
Posted by: rabbit93 Dec 27 2019, 01:32 PM
QUOTE(Christian J @ Dec 27 2019, 08:37 AM)
Actually it seems you can, even CSS seems possible: https://perishablepress.com/better-default-directory-views-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.