Skip to content
Advertisement

How to check a file is video type or not in php?

I have following script:

JavaScript

My question is I want to detect a file is video(mp4 or mov)type, How i can detect $ff is a video type or not?

Advertisement

Answer

JavaScript

There you go, for case insensitive version of the extension

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement