Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Provo, UT
    Thanked 0 Times in 0 Posts

    Lightbulb Can you loop through that contents of a folder on the server?

    The header pretty much sums it up. I want to make an array of the file names in a folder. Like if I had a art gallery that I was always adding to, is there a script that will look in the folder and loop through reading the contents and put the file names into an array? If there isn't a script thats ok. I just need to know if it is possible and what functions I need to use. Thanks for any help in advance.

  • #2
    jkd is offline
    Senior Coder jkd's Avatar
    Join Date
    May 2002
    metro DC
    Thanked 18 Times in 18 Posts
    Can't do server side operations (i.e. directory listing a folder on a server) with a client-side language.

    What you can do is build a web service that returns a dir listing in an array of strings, and through SOAP and such, dynamically retrieve it client-side in both Gecko and IE through proprietary implementations.

    Plenty of hacks I could think of with PHP (or any server side language) that would achieve this too, but the web service method is imho the only "clean" way of doing it.


    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts