PHP:返回zip文件中文件扩展名的数组? [英] PHP: Return an array of the file extensions of files inside a zip file?

查看:64
本文介绍了PHP:返回zip文件中文件扩展名的数组?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图阻止zip文件上载包含某些文件扩展名的文件。在PHP中是否有内置函数,或者至少有一个类/库可以在zip文件中获取所有文件扩展名?

I am trying to prevent zip files from being uploaded if it contains files with certain file extensions. Is there a built-in function in PHP or at least a class/library existing somewhere that can get all the file extensions inside a zip file?

推荐答案

PHP将无法读取文件客户端。在文件上传之前,您将无法检查文件内的文件扩展名。查看以下链接:

PHP won't be able to read the file client side. You won't be able to check the file extensions inside the file until after it is uploaded. Check out these links:

在上传之前检查文件的内容

这篇关于PHP:返回zip文件中文件扩展名的数组?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆