Be sure to use taint checking on your path info, as you wouldn't want anyone to view files they shouldn't be viewing... :)#!/usr/bin/perl -wT use strict; use CGI ':all'; my $q = new CGI; my $imagedir = "/path/to/images"; my $file = $q->path_info(); $file =~ s!^.*/!!gi; print header("image/jpeg"), do { local *ARGV; @ARGV = "$imagedir/$file"; <> };
In reply to (ar0n) Re: Not Strictly A perl question.
by ar0n
in thread Not Strictly A perl question.
by kb2yht
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |