Quick post, more as a reference for myself, of how to get the extension of a file using PHP.
Discovered a great post on Cowburn.info outlining the various ways to do this and the time implications, ending up with:
$filename = 'mypic.gif';
$ext = pathinfo($filename, PATHINFO_EXTENSION);
being the best option. Continue reading “Getting File Extension Using PHP”