Answers for "php check image extension"

PHP
2

get image extension in php

//get image extension of uploaded file in php
$imagetype = $_FILES['image']['name'];
$ext = pathinfo($imagetype, PATHINFO_EXTENSION);// get file extension
Posted by: Guest on October-19-2020
0

valid image extensions in php

$allowed_ext = array('gif', 'png', 'jpg', 'jpeg');
 if (in_array($exts, $allowed_ext))
 {
 	//write your code here
 }
Posted by: Guest on September-09-2021

Code answers related to "php check image extension"

Browse Popular Code Answers by Language