Photo Gallery Help

I’m trying to make a photo gallery for my photos I have. I was thinking of the easiest possible way to accomplish this and I thought that I could put images in certain directories on the server. Then some how display the folder name as an album name. When the user clicks on the album name it will load the pictures in that directory.

My question is can Flash tell me the directories under the root / path on the server? I do know php so could I pass Flash an Array of Directories would that work? I’m not sure how I can program it in Flash to accept the array if someone could show me how it would be awesome. Then I could just use that technique for the images in the directory.

The reason why I want to do this is because all I would have to do to add photos is put new ones in the directory, or if I want to create a new album just create a new dir. Make sense?