Staring at this: $re = '\.' . $bad_exts . '\.*$'; This catches harmless example.com.pdf and more complicated things. I have forgotten what evil can be done with a trailing dot, but before I commit foolishness by changing $re, I thought I'd ask. Joseph Brennan Columbia University Information Technology