从目录中显示图像

编程入门 行业动态 更新时间:2024-10-22 22:55:52
本文介绍了从目录中显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

新年快乐,每个人! 我想弄清楚如何显示一堆图像(主要是 JPEG,但可能是一些GIF和PNG也存储在系统上的 本地目录中。我可以使用glob()函数来做这件事, 但我似乎无法放入 webroot中的一个目录。例如,我只能输入/ uploads。而不是 " / Volumes / jray / Pictures ..." ;. 任何想法如何解决这个问题?如果我不能使用glob函数, 它很好,但我只想要显示图像(而不是任何其他的 文件,它们很有用。存储在该目录中)。 提前致谢!

Happy New Year, Everyone! I am trying to figure out how to display a bunch of images (mainly JPEGs, but possibly a few GIFs and PNGs as well) that are stored in a local directory on the system. I can do this with the glob() function, but I can''t seem to put in a directory other than one within the webroot. For example, I can only put "/uploads" and not "/Volumes/jray/Pictures...". Any ideas how to get around this? If I can''t use the glob function, it''s fine, but I only want images to be displayed (and not any other file that happpens to be stored in that directory). Thanks in advance!

推荐答案

< ?php //关于列出图像的示例。 <?php // An Example about listing Images.

dir ="。" ;; dir = ".";

odir = opendir( odir = opendir(

更多推荐

从目录中显示图像

本文发布于:2023-11-02 08:18:40,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1551867.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:图像   目录中

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!