如何在php中检查文件路径是否为图像? [英] how to check a file path is an image or not in php?
本文介绍了如何在php中检查文件路径是否为图像?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个表,用于存储images.documents,pdf等文件的路径...我的查询是
I have a table that stores file paths of images.documents,pdf etc... My query is
Select File_Paths from Uploads
现在如何使用PHP检查文件路径是否为图像...如果是图像,则必须查看或下载....
Now how do I check whether the file path is image or not using PHP... If it is an image i have to view it or else download it.......
推荐答案
使用文件信息功能.
这篇关于如何在php中检查文件路径是否为图像?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文