in reply to Re: Thoughts on file upload...
in thread Thoughts on file upload...
how's that?my %file_ok = qw{ .gif 1 .jpg 1 .htm 1 .html 1 .txt 1 .doc 1 .pdf 1 }; and then.... ($base,$path,$type) = fileparse($file,'\..*'); and finally... $type =~ tr/A-Z/a-z/; if (!$file_ok{$type}) { print "The type of file you tried to upload ($type) is not sup +ported."; return; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Re: Re: Thoughts on file upload...
by valdez (Monsignor) on Nov 20, 2002 at 16:25 UTC | |
by mojobozo (Monk) on Nov 20, 2002 at 18:49 UTC |