View Full Version : Can you loop through that contents of a folder on the server?

08-06-2002, 12:29 AM
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. :thumbsup:

08-06-2002, 12:37 AM
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.