
kencl
User
Feb 11, 2001, 1:03 PM
Post #1 of 4
(1642 views)
|
|
determining file extension of uploaded image
|
Can't Post
|
|
I havn't worked with regular expressions much, so this is probably pretty easy. I'm trying to get the extension of an uploaded image file. I tried this, but it just stripped the drive letter:
$filehandle = $q -> param("pic"); $extension = substr($filehandle, $filehandle =~ /.(gif|jpg|jpeg)$/i); >> If you can't control it, improve it, correlate it or disseminate it with PERL, it doesn't exist!
|