Pull all images from a specified directory and then display them

前端 未结 5 970
孤街浪徒
孤街浪徒 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 19:54

    You need to change the loop from for ($i=1; $i to for ($i=0; $i:

    So the correct code is

    ";
        echo 'Random image'."

    "; } ?>

提交回复
热议问题