Really Get File Extension

Description: A function that gets the real file extension. Returns an empty string if file has no extension.

<?PHP
 
FUNCTION ReallyGetFileExtension(&$filename){
  RETURN EREG( ".([^\.]+)$", $filename, $r ) ? $r[1] : "";
}
 
?>

Enjoyed this post? Share it!

 

Leave a comment

Your email address will not be published.