Displaying all images within a folder

Discussion in 'HTML & Website Design' started by billpq, Mar 11, 2011.

  1. #1
    I believe I have a simple question...

    On my website will be various folders and within each folder will be anywhere from 1-10 images and/or pdf files. Is there a simple way with html or a template of some sort so that when the user goes to that folder, all the files within the folder are displayed in some organized fashion?

    So if I go to: www.mywebsite/folder1
    All the images and pdf files in folder1 will be displayed.

    Thanks
     
    billpq, Mar 11, 2011 IP
  2. Dimus

    Dimus Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    If you want them displayed as a list of files, you can do this with htaccess. Create a text file, paste this Options +Indexes and save it as .htaccess
    Put this file in your folder.
     
    Dimus, Mar 11, 2011 IP
  3. billpq

    billpq Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thank you, however I was hoping for the actual images to just be displayed w/o anyone having to do anything further, rather than a list someone would have to click on to display each image. And if I happen to add an image to the folder, the next time that image would automatically be displayed with any other images in the folder.

    And again, by images they will either be jpg or pdf files.
     
    billpq, Mar 11, 2011 IP
  4. Dimus

    Dimus Peon

    Messages:
    48
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    I'm not aware of any "standard" methods of doing that. I wrote a php script once that did something similar but it was pretty time consuming. Maybe there are ready-to-use scripts out there on the web.
     
    Dimus, Mar 11, 2011 IP
  5. kemonrider

    kemonrider Peon

    Messages:
    30
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    use php to read the image name and post it on html.

    try this code :

     
    kemonrider, Mar 12, 2011 IP