get extension file upload php code example
Example 1: php get file extension from filename
$ext = pathinfo($filename, PATHINFO_EXTENSION);
Example 2: php get uploaded file extension
$ext = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);
$ext = pathinfo($filename, PATHINFO_EXTENSION);
$ext = pathinfo($_FILES["file"]["name"], PATHINFO_EXTENSION);