检查php文件夹中是否存在文件
我想知道如何在某些条件下检查文件夹中的文件名。
例如 : 文件夹名称是“输出” 该文件夹包含以下图像。 2323a.Png 5235v.Jpeg 2323s.jpg 23523s.JPEG 等等...,
如果我检查文件名是“2323a.png”,但有文件名是2323a.Png。
如何检查文件名是否区分大小写。
提前致谢
i want to know how to check the filename in folder with some condition.
for example :
the folder name is "output"
this folder containing the following the images.
2323a.Png
5235v.Jpeg
2323s.jpg
23523s.JPEG
etc..,
if i check the file name is "2323a.png" but there is file name is 2323a.Png.
how to i check the filename is incasesensitive.
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
恕我直言,你必须阅读目录内容
Imho you have to read the directory contents
在文件名上使用 strtolower 检查它们是否存在。
Use strtolower on your filenames to check if they exist.