从子目录中读取图像 [英] Read images from subdirectory

查看:70
本文介绍了从子目录中读取图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试读取位于所有子目录中的图像。例如,我的主目录是教师,然后我有许多带图像的子目录。

如果我在主目录中有所有图片,下面的代码可以工作。如何从子目录中获取所有图像。谢谢

  foreach (glob( 教师/图片* .jpg as  $ image)
{

解决方案

image)
{


水珠( 教师/ * /图片* .JPG)


I'm trying to read images that are located in all my sub-directories. For example, my main directory is faculty and then I have many sub-directories with images.
The following code work if i have all the pictures in the main directory. How can i get all the images from the subdirectories. Thank you

foreach(glob("Faculty/picture*.jpg") as $image)
{

解决方案

image) {


glob("Faculty/*/picture*.jpg")


这篇关于从子目录中读取图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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