Obtener la extensión de un nombre de fichero From http://stackoverflow.com/questions/10368217/how-to-get-file-extension-in-php
$path = $_FILES['image']['name']; $ext = pathinfo($path, PATHINFO_EXTENSION);