Pull all images from a specified directory and then display them

前端 未结 5 972
孤街浪徒
孤街浪徒 2020-11-29 19:33

How to display the image from a specified directory? like i want to display all the png images from a directory, in my case my directory is media/images/iconized.

I t

5条回答
  •  盖世英雄少女心
    2020-11-29 20:15

    You can display all image from a folder using simple php script. Suppose folder name “images” and put some image in this folder and then use any text editor and paste this code and run this script. This is php code

        "; // show only image name if you want to show full path then use this code // echo $image."
    "; echo 'Random image'."

    "; } else { continue; } } ?>

    if you do not check image type then use this code

    "; // show only image name if you want to show full path then use this code // echo $image."
    "; echo 'Random image' . "

    "; } ?>

提交回复
热议问题