Show an image from a folder with php
-
Hi,
I am trying to show the most recent image in a folder that contains uploads from a web camera. I am trying with the rather naive code:$files = glob("//home1/ab13/public_html/wp-content/uploads/webcam/snap/*.jpg"); rsort($files); echo '<img src="'.$files[0].'" alt="Langaara">'." ";The code finds the right file all right, and then happily displays an indication that file is an image in the sidebar where I put it.
So what I don’t understand is how to get the <img … stuff right.
Any suggetsions?
Best
Jon
The topic ‘Show an image from a folder with php’ is closed to new replies.