Home >Backend Development >PHP Tutorial > 如何判断一个文件夹中符合判断的所有文件是否全部存在

如何判断一个文件夹中符合判断的所有文件是否全部存在

WBOY
WBOYOriginal
2016-06-13 13:09:47923browse

怎么判断一个文件夹中符合判断的所有文件是否全部存在
一个文件夹中
$i为变量..

文件格式c155203203de8aa3f99052c03a0f5d02.pdf$i.swf


必须全部存在返回ture 否则返回false

------解决方案--------------------
count(glob('path/*.swf')) == count(glob(path/*.*'))

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn