get extension of file by spirit November 20, 2013 echo substr($filename, strripos($filename, ‘.’),strlen($filename)); Tags:php