PHP dostaje przesłane rozszerzenie pliku

$ext = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);
Grepper