check for image file in php

by Ramya 2012-09-29 14:30:46

check for image file in php:


Function to check if any image exists in the folder,
function checkImage($getImg){
if(preg_match("/(\.gif|\.jpg|\.png)$/", $getImg)) {
return "Image";
}else{
return "No";
}
}
1056
like
0
dislike
0
mail
flag

You must LOGIN to add comments