why not to keep both names and the pictures themselves into a database? Loggin in is not really that big deal, I think it is worth portability - you'll be changing this someday (as you get too many requests or too many pictures to request). Start from now. Performance will not change too much anyway.
Cheers, Maxim Maletsky www.PHPBeginner.com James E. Hicks III writes: > I think you've got the best set up already. I have a PDF library that I do a > similar thing with. To update the site I just dump the new PDF's into their > directory and the users reload the page to see the new content. > > James > > -----Original Message----- > From: Fifield, Mike [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, April 16, 2002 11:22 AM > To: [EMAIL PROTECTED] > Subject: [PHP] Performance question > > > Ok I have a performance question. I run a wallpaper site; this is the url to > the main gallery page http://www.cognitivedistortion.com/php/gal.php > <http://www.cognitivedistortion.com/php/gal.php> The page does a dir read > and lists all pictures found in each directory, it does this every time the > page is loaded. Now at first this seemed like a incredible inefficient way > to do generate pages. The alternatives to this would be to generate a list > of the pictures and save them in a text file, or create a list of the > pictures and store them in a database. If I use a text file I will have to > read the text file every time the page is generated which seems like it > would take just as long as reading the file allocation table, which I am > doing now. As for the database to get the same thing done I would first have > to log into the database and then pull the information. > I was hoping to get some input as to which would be the fastest/ best way to > use. > > > Mike Fifield > Charles Schwab & Co, Inc. > WARNING: All e-mail sent to or from this address will be received by the > Charles Schwab corporate e-mail system and is subject to archival and review > by someone other than the recipient. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > Maxim Maletsky Founder, Chief Developer PHPBeginner.com (Where PHP Begins) www.PHPBeginner.com [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php