With the next three lines of php code you will be able to get a file extension.
<?php $file = "somefile.gif"; $ext = end(explode('.', $file)); print "Your file extension is $ext"; ?>
With the next three lines of php code you will be able to get a file extension.
<?php $file = "somefile.gif"; $ext = end(explode('.', $file)); print "Your file extension is $ext"; ?>
This works very well.
Can be used to check files in a download script and reject certain file-types.
Yup I agree! Thanks
what if there s a file called whatever.whatever.mp3?
What would be the problem? no problem it will work with any file extension
commenting usually isnt my thing, but ive spent an hour on the site, so thanks for the info
cool, thank you very much! subscribe to feed too I keep it updated – at least I try.