The way of indexing without indexing

A few months ago, Hiroshi asked me for a favor. He needed a way to make a listing of files in a folder on a server denying the ability to list a directory contents, and ignoring .htaccess attempts to override this.

My solution was a simple 6 line PHP script that spit out each file name into an unordered list.

Today I found it on my disc and decided it would be neat to make it look a bit more like Apache’s FancyIndexing. Then I decided, why not go even further?

Six hours later, I created NotSoFancy!. It’s a simple PHP script that probably has a lot of potential use for many people out there. At base, it generates indexes similar to Apache’s FancyIndexing, except with much nicer fonts. It uses simple MIME identification code (by extension) that I wrote, and that was the bulk of my work time on this project. It supports icons, file names, modified dates with a formattable date string, file sizes you can specify your own significant digits for, and full templating.

The result is a zero-effort file indexing system that works on any machine with PHP, regardless of what Apache locks off. Even if you aren’t locked out by Apache, you can create far more beautiful indexes, even integrating them with your site.

Basically, once you install NotSoFancy!, you just put the index.php file in whatever folder you want to allow indexing in, and make sure the relative path to NotSoFancy.php is still correct. That’s it.

I was considering letting people pass values to navigate folders without actually changing folders, but it seemed to really defeat the purpose of having NotsoFancy! as a substitute directory indexing service.


About this entry