我爱占星网 我爱占星网
首页
编程
java
php
前端
首页 编程 java php 前端

使用PHP检查目录中是否存在图像文件

I have image files in a directory which have downloaded from several resources.

If I have the name of an image, how can I check its existence using PHP?

file_exists()

is_file() checks whether the file exists.

EDIT: btw, getImageSize() tells you a lot about the image, if it is valid, parseable by your server, how big it is, what type of image, etc. It is said to be slower than some of the more specialized functions, but when this returns true, you can be sure that the image will be fully usable.

近期文章

  • 关于小Q的新式棋盘题,如何解决?
  • 这个奇怪的焊盘有什么用?
  • 我的结构体为什么只写进去了123456?
  • 【有偿】助,自己写了代码
  • 求十个数中最大的数!
  • python statannotations显著性标记添加细节conselling!
  • STC15输出PWM频率不精确
  • 关于非匿名内部类的一个问题.
  • python 日常出错
  • hdfs namenode -format错了主机请问怎么才能返回来?
  • PHP在没有循环的情况下获取数组中最长的字符
  • vultr上物理主机用ipxe装windows系统装不上.
  • 关于匿名类的一个问题/
  • STC15输出PWM频率不精确
  • 关于内存泄漏的问题,如何解决?
  • L->elem=(ElemType *)malloc(sizeof(ElemType)*LISTINITSIZE);具体解释
  • 关于R语言lapply ()函数
  • PHP - 成员封装返回奇怪的引用
  • C++模仿命令提示符报错:invalid conversion from 'char' to 'const char*' [-fpermissive]
  • Javaweb项目,表单没法正常提交

Copyright ©2022 我爱占星 All Rights Reserved.

浙ICP备2022030071号-1

部分图文来自网络,如有侵犯您的版权,请告诉我们删除

友情链接:代码精华