PHP: display most recent images from directory?

后端 未结 2 1498
萌比男神i
萌比男神i 2020-12-22 00:47

I have a camera server FTPing images to a webserver. Can anyone suggest the PHP snippet I\'d need that would look through the server\'s public root directory (/public_html)

2条回答
  •  情深已故
    2020-12-22 00:57

    I've put together something that can help you. This piece of code displays the last recent images in the root directory of your server.

     -1) //this made me laugh when I wrote it
               echo "".$image."
    Created on ".date('D, d M y H:i:s', filemtime($image)) ."


    " ; //display images else break; } ?>

提交回复
热议问题