php check if file is video

Solutions on MaxInterview for php check if file is video by the best coders in the world

showing results for - "php check if file is video"
Edoardo
24 May 2017
1$mime = mime_content_type($file);
2if(strstr($mime, "video/")){
3    // this code for video
4}else if(strstr($mime, "image/")){
5    // this code for image
6}