Using this php code you can able to know file extension & file_before_extension.
*********
<?php
$file_name=’abc.txt’;
echo “<br>extension=”.  end(explode(‘.’, $file_name));

echo “<br> before extension=”. current(explode(‘.’, $file_name));

//hint basename(filename)
?>
and OUTPUT
extension=txt
before extension=abc
************

Share on Facebook