magazine resources subscribe about advertising

New Architect Daily
Commentary and updates on current events and technologies

CMP Media E-Book

Download your copy today.

Research
Search for reports and white papers from industry vendors and analysts.

This Week at NewArchitect.com Subscribe now to our free email newsletter and get notified when the site is updated with new articles







Day of Defeat Online Gaming

 New Architect > Archives > 1999 > 01 > Programming with Perl

A Smart Picture Album

One of the side effects of buying my first still camera in nearly two decades is that I started taking pictures of everything. One of the nice things about buying a digital camera is that I have the results immediately. The downside is that I take a lot of pictures and want to show them off, because I don't have to worry about the cost or time of having some silver-halide-coated emulsion turned into light and dark spots.

In my September 1998 column, I described a little tool to create thumbnails from a directory full of JPEGs (see "Manicured Thumbnails"). In the past few weeks, I've used this program to create thumbnails of the pictures I've taken with my new camera. But now I have hundreds of pictures in a given directory. People started complaining about how long it took to download even the thumbnails from my Web site, so I knew I needed another solution.

Luckily, I remembered that the number-one server, Apache (which happens to be on what my ISP uses), has the ability to have not only an HTML file for the index for a directory, but also a CGI script to do the indexing. This is triggered with either a .htaccess file or the configuration files containing a line such as:

DirectoryIndex /cgi/pictures

So I put that line into the .htaccess for my Pictures directory, which means that directory and all subdirectories now invoke the named CGI script whenever the directory itself is requested. Note that this does not invoke the CGI script for the files within the directory.<>




  Day of Defeat Online Gaming

home | daily | current issue | archives | features | critical decisions | case studies | expert opinion | reviews | access | industry events | newsletter | research | careers | info centers | advertising | subscribe | subscriber service | editorial calendar | press | contacts


Copyright © 2006 CMP Media, LLC Read our privacy policy, your California privacy rights, terms of service.
SDMG Web sites: BYTE.com, C/C++ Users Journal, Developer Pipeline, Dr. Dobb's Journal, DotNetJunkies, MSDN Magazine, Sys Admin,
SD Expo, SD Magazine, SqlJunkies, The Perl Journal, Unixreview, Windows Developer Network, New Architect

web2